Skip to content

Instantly share code, notes, and snippets.

View teebot's full-sized avatar

Thibaut Nguyen teebot

View GitHub Profile
@teebot
teebot / gist:06c1361f481a7d66fb2f
Created June 6, 2014 22:48
Un-commit last un-pushed git commit without losing the changes
git reset HEAD~1 --soft
@teebot
teebot / gist:e20ad1a824a25ebc4738
Created June 5, 2014 09:05
any object by its id from a collection
employees = [{ id : 1, name : "tib" }, { id : 2, name : "dude" }]
search = (input, id) ->
for i in [0..input.length - 1]
if (input[i].id == id)
return input[i];
return null