Careers | Blog | Sitemap  
   
   
  Wanna try working with us?  
  email: info@hibiscustech.com  
     
 

Finding Latitude and Longitude for a place

September 7th, 2009

I was looking for a quick reference to find the latitude and longitude for any destination. I found a few sites that lists popular city’s lat, long, but what about not so popular ones, what about places inside cities - I searchd for a while and gave up.

Everyone know this is trivial as all travel sites, google maps, google map tools do this.

So I have written this piece of code, that would takee in a place and give out the lat and long. This would work for most places - Thanx to Google API!

Click here to get the latitude and longitude of your place

Installing SVN and Redmine in HostMonster

July 29th, 2009

Installing SVN in HostMonster is really simple. (Please DO NOT ask for support to HostMonster)

1) wget www.sharpstep.com/Articles/HostMonster-svn/svn-install.sh

2) chmod a+x svn-install.sh

3) ./svn-install.sh

Installing RedMine in HostMonster

wget http://rubyforge.org/frs/download.php/49319/redmine-0.8.0.tar.gz

gunzip redmine0.8.0.tar.gz

tar xvf redmine0.8.0.tar

rake db:migrade RAILS_ENV=’production’

Follow instructions in my previous blog RoR & HostMonster

create dispatch.cgi; dispatch.fcgi; dispatch.rb and .htaccess

Good to Go!

Ruby On Rails And HostMonster

July 29th, 2009

Browsing the web it seems to be quite a challenge installing and working with Ruby On Rails on HostMonster.

We felt the same, once we figured out the tricks, we have really started appreciating deploying on this.

Here are a tips for deploying RoR apps:

Creating an RoR App in Host Monster

1) Create an app in Ruby on Rails console in cPanel and PATH pointing to the my_rails_app rails app root directory (under which u would have public, config, etc..)

2) Create a subdomain (if required) using cpanel, give it your app name myapp (HOME/public_html/myapp)

3) Build your app OR extract your app in the my_rails_app dir

4) Go to the MySql Databases in cPanel, create the Database you want to use and the user name, associate the DB with the user.

5) Go to my_rails_app/config/database.yml and make the necessary changes

adapter: mysql

database: myid_dbname

username: myid_username

password: mypassword

hostname: localhost

5)  Go to my_rails_app/config/environment.rb and add the line

ENV['GEM_PATH'] = ‘/my/home/dir/ruby/gems:/usr/lib/ruby/gems/1.8′

6) rm ~/public_html/myapp

ln -s my_rails_app_dir myapp

7) Check if you have dispatch.cgi; dispatch.fcgi; dispatch.rb if not copy from any of your RoR apps

8 ) make sure your .htaccess is fine, better still copy this..

<IfModule mod_fastcgi.c>

AddHandler fastcgi-script .fcgi

</IfModule>

<IfModule mod_fcgid.c>

AddHandler fcgid-script .fcgi

</IfModule>

<IfModule mod_cgi.c>

AddHandler cgi-script .cgi

</IfModule>

Options +FollowSymLinks +ExecCGI

# If you don’t want Rails to look in certain directories,

# use the following rewrite rules so that Apache won’t rewrite certain requests

#

# Example:

#   RewriteCond %{REQUEST_URI} ^/notrails.*

#   RewriteRule .* - [L]

# Redirect all requests not available on the filesystem to Rails

# By default the cgi dispatcher is used which is very slow

#

# For better performance replace the dispatcher with the fastcgi one

#

# Example:

#   RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

RewriteEngine On

# If your Rails application is accessed via an Alias directive,

# then you MUST also set the RewriteBase in this htaccess file.

#

# Example:

#   Alias /myrailsapp /path/to/myrailsapp/public

#   RewriteBase /myrailsapp

RewriteRule ^$ index.html [QSA]

RewriteRule ^([^.]+)$ $1.html [QSA]

RewriteCond %{REQUEST_FILENAME} !-f

<IfModule mod_fastcgi.c>

RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

</IfModule>

<IfModule mod_fcgid.c>

RewriteRule ^(.*)$ dispatch.cgi [QSA,L]

</IfModule>

# In case Rails experiences terminal errors

# Instead of displaying this message you can supply a file here which will be rendered instead

#

# Example:

#   ErrorDocument 500 /500.html

ErrorDocument 500 “<h2>Application error</h2>Rails application failed to start properly”

9) go to the browser and hit
http://myapp.mydomain.com
You should feel happy now ;-)

15 Simple SEO Tricks

July 17th, 2009

All our customers have at some point in time been really concerned about the search engine results. It is always difficult to pin point exactly why the result show what we are expecting.

Some simple steps you can do with google are

1) Descriptive URLs - URLs that contain keywords always provide in better results

2) All links in the web site should be accessible from the home page - Do not hide all your contents and show only logged in users; crawlers wont see it.

3) Use http instead of https; use https only where it is necessary; and not for the entire site

4) Providing a sitemap (there are a lot of sitemap generators!)

5) Use only relevant keywords in meta tags

6) Meaingful title, Description in the meta tag

7) use of <a href..> instead of window.location

8 ) Server uptime - obviously!

9) Pages need to be focussed; dont confuse the page with too many topics; split into multiple pages instead

10) Do not duplicate content; dont have multiple pages showing the same/similar contents (may be considered spam)

11) Use more texts than images

12) Have permanent/accessible link even to show contents from the DB - dont have pages that can come only out of search results (for eg.)

13) Avoid repetition of keywords (may be considered spam)

14) Anchor tags with relevant keywords/phrases. (avoid image tags)

15) H1 tags are considered more relevant than others <p> for eg.

And last but not least, make sure a lot of sites refer to your site. Make your URL’s presence in popular blogging sites, bookmarking sites, etc.
Hope This Helps!

  Home | About Us | Web Development | Mobile Apps | Portfolio | Work with us | Careers | Blog | Sitemap