Skip to content

Instantly share code, notes, and snippets.

View terraflubb's full-sized avatar

Rob Fletcher terraflubb

View GitHub Profile

Keybase proof

I hereby claim:

  • I am terraflubb on github.
  • I am terraflubb (https://keybase.io/terraflubb) on keybase.
  • I have a public key ASBpSPuL-J27LwZtTbQd32d2pJ4fcbf3cRKoDnUWFwDV5Qo

To claim this, I am signing this object:

@terraflubb
terraflubb / gist:3185739
Created July 27, 2012 01:48
Abasso#cast in coffeescript
cast = (obj, key = false) ->
o = []
unless isNan obj.length
if !client.ie or client.version > 8
o = Array::slice.call obj
else
utility.iterate obj, (i, idx) ->
o.push i unless idx is "length"
else
if key
@terraflubb
terraflubb / gist:3185416
Created July 27, 2012 00:31
avoidwork's coffee quiz
# I'm not sure what you mean @avoidwork ...
#
# "how do you make a lambda pass this and call it global? do (global) -> :/
#
# If you mean "pass this" as in hang onto the context from which the
# function was declared, then I think you want to use the fat arrow =>
@banana = "tasty"
global = =>