AutoCompletion script for world places using google geocode API

Source code and README available at: https://github.com/prabgupt/geocode_autocompletion_js Purpose of this Utility: It will auto suggest world places based on user input Instructions  as well as sample HTML to use the code are mentioned inside README mentioned above. Making of geocode_autocomplete.js I’m assuming here that you are already familiar with JavaScript/jQuery. You’ll need to understand following things […]

Continue reading


Tips and Tricks in Ruby on Rails

Use escape_javascript: When you are making an ajax call and in response sending JS that will insert the content in an HTML element, make sure you run escape_javascript on the content. For e.g.  $(“#div”).html(‘<%= variable %>’). In this case if variable’s value contains a quote ‘, the resulting JS that would be rendered in browser: $(“#div”).html(‘value_’_with_quote’). This […]

Continue reading


Private Chat Room in Ruby on Rails 3.0

This sample will let you develop a private chatRoom using juggernaut. It push chats in realtime based on publish/subscribe model, hence making it extremely fast and scalable. Resources Nodejs – http://nodejs.org/ Redis – http://code.google.com/p/redis/ Juggernaut – https://github.com/maccman/juggernaut/ JQuery – http://mirror.ozdiy.com/assets/b8/2f96a12bc919b37e09d303b86ea1b9_1251811910.html Getting started 1.  Install node-v0.2.5 – Download 2.  Install redis 2.0.4 – Download 3.  Run […]

Continue reading