Skip to content

Instantly share code, notes, and snippets.

View stephband's full-sized avatar

stephband stephband

View GitHub Profile
@stephband
stephband / gist:955477
Created May 4, 2011 16:03 — forked from jakearchibald/gist:955241
OCD in action
.whatever {
-webkit-box-shadow: 0 2px 2px rgba(0,0,0,0.5) inset;
-moz-box-shadow: 0 2px 2px rgba(0,0,0,0.5) inset;
-o-box-shadow: 0 2px 2px rgba(0,0,0,0.5) inset;
box-shadow: 0 2px 2px rgba(0,0,0,0.5) inset;
}
@stephband
stephband / overload-by-type.js
Last active August 29, 2015 14:27
Overload a function according to the types of arguments passed in
// Overload a function according to the types of arguments passed in:
//
// var fn = overloadByTypes({
// 'object': function(object) {},
// 'string number': function(string, number) {},
// 'default': function() {}
// });
//
// Returns the result of the called function. To return this to create
// a chainable method, for example, pass in true as a second argument: