Monthly Archives: July 2013

Convert latitude and longitude from decimal to Deg and vice versa in Jquery

Following code snippet will convert decimal latitude and longitude into degree, min and sec

To convert a latitude and longitude in degree min sec to decimal


Laravel : Install laravel 4 on a shared host

I have been trying to figure out to install Laravel 4 on a shared hosting, but there was not enough information available for this, so I talked with people in Laravel IRC and install the Laravel 4 on a shared hosting by only exposing public content and hiding application files.

Normally on Linux shared hosting we have following directory structure


|- accesss-logs

|- etc

|- public_ftp

|- public_html

|- www

Whatever we save under public_html folder becomes available for world. In the Laravel documentation it has been mentioned that we should upload application files outside public folder.

Note: Laravel is designed to protect your application code, and local storage by placing only files that are necessarily public in the public folder. It is recommended that you either set the public folder as your site’s documentRoot (also known as a web root) or to place the contents of public into your site’s root directory and place all of Laravel’s other files outside the web root.

So, now cut paste all the contents of public folder in the root of your application, If you are working on Xampp your path will be

Now we need to upload all these files on server, for this create a folder

say your folder name is “your-application”, after this upload app, bootstrap, packages, vendor in this directory. Now upload all remaining files in

So far so good, the only remaining task is to change the paths, open index.php files under


We need to change the path in one more file to configure public folder path. Now open a file in


Since, we have pasted all our files in public folder in this directory, we are mentioning this path to locate public files of our application.

that’s it, now open this in your browser and you will see the default welcome page.