Skip to content

Instantly share code, notes, and snippets.

View Starefossen's full-sized avatar
🍉
Developer experience in the Norwegain Government

Hans Kristian Flaatten Starefossen

🍉
Developer experience in the Norwegain Government
View GitHub Profile
@Starefossen
Starefossen / roulette
Created March 4, 2013 05:57
Command line Russian roulette
[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo *Click*
@Starefossen
Starefossen / object.extend.coffee
Created December 16, 2012 16:06
Makes it possible to extend object in the following way: myObject.extend otherObject
# Extend Object Prototype
Object::extend = (obj) ->
org = this
Object.keys(obj).forEach (key) ->
prop = Object.getOwnPropertyDescriptor obj, key
Object.defineProperty org, key, prop
this