Skip to content

Instantly share code, notes, and snippets.

View stevemorris's full-sized avatar

Steve Morris stevemorris

View GitHub Profile
@stevemorris
stevemorris / gist:1236786
Created September 23, 2011 05:11
Compare currency data sets
# Here's a hack I wrote to verify the currency hash loaded by the current Ruby Money gem is the same as
# the hash loaded via JSON in my fork of the gem.
# To run this script:
# 1. clone my fork with git clone https://github.com/stevemorris/money, and cd to the root of the project
# 2. download currency.rb from master to the root of the fork by running the command:
# curl -O https://raw.github.com/RubyMoney/money/master/lib/money/currency.rb
# 3. run this script from the root of the fork. the script should print 'true'. you can ignore the
# warning about TABLE already being initialized.
# 4. make a change to the TABLE hash in the currency.rb file you downloaded. then rerun the script and
@stevemorris
stevemorris / gist:1232537
Created September 21, 2011 16:25
Circuitry
module Circuitry
extend self
attr_reader :circuits
@circuits = {}
def []=(name, definition)
@circuits[name] ||= definition
end