-
Recent Posts
Recent Comments
- Wasim on My three beautiful years with Allerin Technologies
- Zeenat on Authlogic gem/plugin with Ruby on Rails 3
- Chapel Hill Web Design & SEO on link_to with HTML tags in Rails 3.x
- golf lessons mn on W3C CSS Validation for CSS level 3
- download internet explorer for mac os x on W3C CSS Validation for CSS level 3
Archives
- May 2012
- March 2012
- December 2011
- October 2011
- August 2011
- July 2011
- June 2011
- May 2011
- April 2011
- March 2011
- February 2011
- September 2010
- August 2010
- June 2010
- May 2010
- April 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- February 2009
- January 2009
- December 2008
- November 2008
Categories
Meta
Author Archives: piyush
Enhance your Rail’s application performance using home_run
Working with Dates doesn’t always yield lightning fast results. Recently when working on one of my assignments, I came across this superb piece of work called as `home_run`. We deal with Dates every now and then. Ruby Date class is … Continue reading
Posted in My Voice
Leave a comment
RSS parser Ruby
require ‘rss/2.0′ require ‘open-uri’ open(“http://feeds.bbci.co.uk/news/rss.xml?edition=int”) do |response| ping_successful = response.status[0] == “200″ ? true : false if ping_successful content = response.read rss = RSS::Parser.parse(content, false) rss.items.each do |item| puts item.link puts item.title puts item.description puts item.date puts item.author puts item.category … Continue reading
Sending emails using Gmail and Ruby
require ‘net/smtp’ message = <<MESSAGE_END From: sender@gmail.com To: recipient@gmail.com Subject: Sending emails using Gmail and Ruby Wow ! This is easy ! MESSAGE_END smtp = Net::SMTP.new 'smtp.gmail.com', 587 smtp.enable_starttls_auto smtp.start('gmail.com','sender@gmail.com', PASSWORD, :plain) do |smtp| smtp.send_message(message,'sender@gmail.com','recipient@gmail.com') end
Select multiple option without CTRL Click (or Cmd-Click on Mac)
$(document).ready(function(){ customizeMultiSelect(); }); function customizeMultiSelect(){ $(‘.customize_multiselect option’).click(function(){ var select = $(this).parents(“select:first”); var option = $(this); var option_selected = $.inArray(option.val(), select.val()); // return true if clicked option is selected else false var option_values = new Array(); // use map to avoid … Continue reading
GIT – How to check in which branches a specific commit is present?
Here’s a quick way of doing it :- 1. Take example of this GIT repository - https://github.com/resolve/refinerycms 2. It has 5 different branches 3. If you need to check if Move mime-types requirement to the gemspec and controller instead of Gem… https://github.com/resolve/refinerycms/commit/738c6a0b189c4fa1d540fceb00de2f1f195bc507 is present … Continue reading
Posted in Technology
Leave a comment




