Skip to content

Instantly share code, notes, and snippets.

View rpheath's full-sized avatar

Ryan Heath rpheath

View GitHub Profile
// jQuery plugin:
// converts a float number as text in some element
// into US currency
//
// Ex:
// <span id="price">1234988.3400</span>
//
// $('span#price').toCurrency()
// => <span id="price">$1,234,988.34</span>
(function($) {
module States
def self.abbreviation_for(state)
LIST.invert[state]
end
def self.to_options
LIST.merge("--" => nil).sort
end
LIST = {
require 'colored'
def banner(title, pad = 85)
puts "\n#{title} ".ljust(pad, "*").yellow
end
def stripe
puts ("-" * 84 + "\n").yellow
end
template(:rph) do
gem 'RedCloth'
gem 'mislav-will_paginate'
gem 'ruby-openid'
plugin 'rspec', :git => 'git://github.com/dchelimsky/rspec.git'
plugin 'rspec-rails', :git => 'git://github.com/dchelimsky/rspec-rails.git'
plugin 'restful-authentication', :git => 'git://github.com/technoweenie/restful-authentication.git'
plugin 'open_id_authentication', :git => 'git://github.com/rails/open_id_authentication.git'
plugin 'hoptoad_notifier', :git => 'git://github.com/thoughtbot/hoptoad_notifier.git'