Skip to content

Instantly share code, notes, and snippets.

0x5f153F02f8E45D9C3a87DF489F2D9aA2b760074c

Keybase proof

I hereby claim:

  • I am dmotz on github.
  • I am dmotz (https://keybase.io/dmotz) on keybase.
  • I have a public key whose fingerprint is 3BAB 8B79 C5CD 4C58 3274 3C34 9C02 914B F74C E534

To claim this, I am signing this object:

@dmotz
dmotz / mccarthy91.coffee
Created October 16, 2013 18:21
mccarthy91
m = (n) -> if n > 100 then n - 10 else m m n + 11
@dmotz
dmotz / tgthr.coffee
Created May 18, 2013 22:15
key/value parallel async task handler in 6 lines of coffee
tgthr = (fns, cb, res = {}) ->
out = (k) -> ->
delete fns[k]
res[k] = arguments
cb res unless Object.keys(fns).length
v out k for k, v of fns
@dmotz
dmotz / sort.coffee
Created March 27, 2013 21:26
recursive sort in 3 lines of coffee
sort = (l) ->
return [] unless l.length
h = l.shift()
(sort (x for x in l when x <= h)).concat([h]).concat sort (x for x in l when x > h)