Josh Software

Ruby

Auto Added by WPeMatico

josh ruby

Amazon EC2 and MongoDB configuration for great performance – Josh Software

Amazon EC2 and MongoDB configuration for great performance – Josh Software Sometimes, we prefer using Amazon EC2 directly for our Rails stack. No offense  to Heroku but we need a more controlled environment; and no offense to EngineYard as they don’t support MongoDB on their environment as yet. We were faced with several problems that …

Amazon EC2 and MongoDB configuration for great performance – Josh Software Read More »

josh ruby

GoRuCo – the party never stops! – Josh Software

GoRuCo – the party never stops! – Josh Software Gautam Rege 2012-06-27 17:16:21 It’s not often that you get a chance to attend a conference that has your name on it β€” well almost πŸ˜‰ Gotham Ruby Conference (GoRuCo) in New York city was one such conference that I attended last weekend on 23rd June. It …

GoRuCo – the party never stops! – Josh Software Read More »

josh ruby

Ruby back to basics – Modules and more de-mystified – Josh Software

Ruby back to basics – Modules and more de-mystified – Josh Software Gautam Rege 2012-05-24 15:03:58 I often teach Ruby at corporates, take some classes at colleges and speak at some events. Its great when I encounter aggressive and passionate programmers who question and counter question me at every step. These are some of the …

Ruby back to basics – Modules and more de-mystified – Josh Software Read More »

ui modernization

Sencha Touch MVC application with Rails – Josh Software

Sencha Touch MVC application with Rails – Josh Software For sometime, we have been toying around with different frameworks to build cross-platform mobile applications. Our latest research was with Sencha Touch. This post is a tutorial to get kick-started. Installation To run Sencha Touch application you need: A running web server. I used a Rails …

Sencha Touch MVC application with Rails – Josh Software Read More »

cloudOps

IndexTank – So long and thanks for all the fish! – Josh Software

IndexTank – So long and thanks for all the fish! – Josh Software IndexTank got acquired by LinkedIn just a while back and I received a newsletter saying that they may discontinue services in 6 months. My tweet about this got a few responses from Pat Allen (@pat – the creator of Flying Sphinx) and …

IndexTank – So long and thanks for all the fish! – Josh Software Read More »

josh ruby

Language independant translator using haml parser – Josh Software

Language independant translator using haml parser – Josh Software Localization is usually necessary in every website. We wanted to add localization in an existing application with more than 100 pages! Now it would be crazyto go and change each view and add the unique keys in the .yml or .po file. I google’d and I …

Language independant translator using haml parser – Josh Software Read More »

josh ruby

Overriding to_s method for BigDecimal instance – Josh Software

Overriding to_s method for BigDecimal instance – Josh Software requirement was to display decimal numbers which are having scale values present to be displayed in decimal format otherwise display them as integer. Output expected 12.23 => 12.23 12.00 => 12 While rendering any object on html page by default β€œto_s” method gets executed.So, i overwrote …

Overriding to_s method for BigDecimal instance – Josh Software Read More »

josh ruby

Hpricot scraping in ruby – Josh Software

Hpricot scraping in ruby – Josh Software Include gems/library required before getting started require ‘hpricot’ require ‘net/http’ require ‘rio’ # Pass website url to be scraped url = “www.funonrails.com” # Define filename to store file locally file = “temp.html” # Save page locally rio(url) < rio (file) # Open page through hpricot doc = Hpricot(open(file)) …

Hpricot scraping in ruby – Josh Software Read More »

josh ruby

Passing commandline parameter (arguments) to ruby file using optparser – Josh Software

Passing commandline parameter (arguments) to ruby file using optparser – Josh Software Ruby file accepts from command prompt in the form of array. Passing parameters ruby input.rb TOI DH TimesNew Accessing parameters # input.rb p ARGV # => [“TOI”, “DH”, “TimesNew”] p ARGV[0] # => “TOI” p ARGV[1] # => “DH” Optparser : parses commandline …

Passing commandline parameter (arguments) to ruby file using optparser – Josh Software Read More »