Ruby Rand Range
I assumed that rand would take a range as an argument. Something like rand(10..20), generating a random number between 10 and 20. Seems like you'd do this fairly often when working with random numbers and therefore, included. However, it doesn't work. But...
Written by Sean Behan on 06/17/2012
Installing Redis Server and Client on Mac OS X and Ubuntu
wget http://redis.googlecode.com/files/redis-0.900_2.tar.gz
tar xzvf redis-0.900_2.tar.gz
cd redis-0.900
make
mv redis-server /usr/bin/
mv redis-cli /usr/bin/
Written by Sean Behan on 06/17/2012
Rails Plugin Acts as Taggable on Steriods
You can download it here http://github.com/suitmymind/acts-as-taggable-on-steroids as well as read usage info (which is for the most part reprinted here).
./script/plugin install http://svn.viney.net.nz/things/rails/plugins/acts_as_taggable_on_steroids
....
Written by Sean Behan on 06/17/2012
Send Mail in Ruby with a Pony
Great little gem that let's you quickly and easily send out mail from your ruby scripts.
gem install pony
require 'rubygems'
require 'pony'
Pony.mail :from=>"me@example.com", :to=>"you@example.com", :subject=>"hello", :body=>"world"
Written by Sean Behan on 06/17/2012
How To Create a Dump File in Postgres Compatible with Heroku
When Heroku creates a dump file of your Postgres database it uses the `-Fc` option
It is equivalent to running
pg_dump -Fc -d name_of_db > name_of_db.dump
This command will let you import your database with the `pg_restore` command
pg_rest...
Written by Sean Behan on 03/06/2017