Skip to content

Instantly share code, notes, and snippets.

View miketaylr's full-sized avatar
🌭

Mike Taylor miketaylr

🌭
View GitHub Profile
@miketaylr
miketaylr / Usage
Created December 13, 2009 00:42 — forked from akahn/Usage
$ spawn 3
# => open 5 new Terminal tabs, cd to the current directory
$ spawn 5 ~/Code/project-x
# => Open 5 new Terminal tabs, cd to ~/Code/project-x
// based on methodology developed by PPK:
// http://www.quirksmode.org/blog/archives/2009/08/when_to_read_ou.html
(function($){
$.benchmark = function(times, result_selector, func){
var startTime = new Date().getTime();
while (times != 0){
func();
times--;
}
// find all elements with a z-index and indicate what they are.
function contrast(color){ return '#' +
(Number('0x'+color.substr(1)).toString(10) > 0xffffff/2 ? '000000' : 'ffffff');
}
jQuery('*')
.filter(function(){ return $(this).css('zIndex') !== 'auto'; })
.each(function(){