This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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--; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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(){ |
NewerOlder