http://mashable.com/2010/10/23/youtube-job/
http://mashable.com/2010/10/24/innovative-api-uses/
/* | |
* Text shadow with conditional IE support. | |
* | |
* Examples: | |
* text-shadow: none | |
* text-shadow: <color>? <offset-x> <offset-y> <blur-radius>? | |
* text-shadow: <offset-x> <offset-y> <blur-radius>? <color>? | |
*/ | |
// TODO: Convert color to hex | |
text-shadow() |
// See comments below. | |
// This code sample and justification brought to you by | |
// Isaac Z. Schlueter, aka isaacs | |
// standard style | |
var a = "ape", | |
b = "bat", | |
c = "cat", | |
d = "dog", |
// Feross Aboukhadijeh - Apr 12 2010 | |
// | |
// Script I hacked together to cheat on TypeRacer.com. You use it by waiting for the typing game | |
// to start. Once it starts, open up Firebug, paste in this code, and run it. Now, just press | |
// space to auto-type each word. I made the user push space, as opposed to advancing the words | |
// automatically because I believe the site looks for a keypress event before evaluating the contents | |
// of the input box. I could not figure out how to fake a user keypress event. Perhaps this is | |
// disallowed for browser security reasons? | |
// | |
// Next todo: Site detects the unbelievable WPM and asks you to do a captcha test. |
var count = 0; | |
var memoizer = function(memo, formula) { | |
var recur = function(n) { | |
var result = memo[n]; | |
if (typeof result !== "number") { | |
result = formula(n); | |
memo[n] = result; | |
} | |
return result; |
$.when( $.getJSON('/some/data/'), $.get('template.tpl') ).then(function( data, tmpl ){ | |
$( tmpl ) // create a jQuery object out of the template | |
.tmpl( data) // compile it | |
.appendTo( "#target" ); // insert it into the DOM | |
}); |