Skip to content

Instantly share code, notes, and snippets.

View robbrit's full-sized avatar
🏠
Working from home

Rob robbrit

🏠
Working from home
View GitHub Profile
$ ->
c = $("canvas").get(0)
ctx = c.getContext "2d"
#ctx.font="20px sans-serif"
#mainLoop
#running
initial_sleep_length=250
sleep_length=initial_sleep_length
img_data_for_player=ctx.createImageData c.width,c.height
tile_size=25
@robbrit
robbrit / gist:33610
Created December 8, 2008 21:04 — forked from edward/gist:32225
class Hash
def except(*blacklist)
self.reject {|key, value| blacklist.include?(key) }
end
def only(*whitelist)
self.reject {|key, value| !whitelist.include?(key) }
end
end