Active Record Find Methods
Active Record find methods for selecting range from http://charlesmaxwood.com/notes-from-reading-activerecordbase/
Student.find(:all, :conditions => { :grade => 9..12 })
return a range
Student.find(:all, :conditions => { :grade => [9,11,12] })
will retu...
Written by Sean Behan on 06/17/2012
Adding RSS Graffiti to my Facebook Page
I added the RSS Graffiti application to my Facebook account. It's a nifty app that lets you add any valid Rss/Atom feed to your profile (includes publishing to your wall) and to your pages.
Written by Sean Behan on 06/17/2012
Gem Information with Gem List
If you want to get version information about a gem the easiest way to do it is with this command
gem list
For example
gem list activemerchant
will output the activemerchant versions I have installed. You can pass only part of the name like
gem list ...
Written by Sean Behan on 06/17/2012
How to Fix Line Wrap Bug in iPython Terminal on OS X Mavericks
There is annoying line wrap issue present after installing iPython on OS X Mavericks for the first time. The issue has to do with readline being missing. To fix the problem uninstall iPython, install readline and then install iPython.
pip uninstall ip...
Written by Sean Behan on 10/26/2013
Using Grep To Find or Match All Links in an HTML Document
egrep -or "(http(s)?://){1}[^'\"]+" path/to/directory
You can further reduce to just return the images by piping again.
grep -r src views/ | egrep -o "(mailto|ftp|http(s)?://){1}[^'\"]+"
The -r flag is for a recursive directory scan....
Written by Sean Behan on 09/15/2013