Skip to content

Instantly share code, notes, and snippets.

@catalogchoice
catalogchoice / gist:981233
Created May 19, 2011 17:05
ruby on rails BIGINT
def self.up
create_table(:people) do |t|
t.integer :number_of_facebook_friends
end
change_column :people, :number_of_facebook_friends, :bigint
end
def self.up
create_table(:product) do |t|
t.integer :bigbig
end
change_column :product, :bigbig, :bigint
end
fooMock = {
bar: sinon.stub()
};
@catalogchoice
catalogchoice / gist:934418
Created April 21, 2011 12:49
coffeescript name space
namespace = (target, name, block) ->
[target, name, block] = [(if typeof exports isnt 'undefined' then exports else window), arguments...] if arguments.length < 3
top = target
target = target[item] or= {} for item in name.split '.'
block target, top
amespace = (target, name, block) ->
[target, name, block] = [(if typeof exports isnt 'undefined' then exports else window), arguments...] if arguments.length < 3
top = target
target = target[item] or= {} for item in name.split '.'
block target, top