Skip to content

Instantly share code, notes, and snippets.

/* tracer.js - A tracer utility in 2kb
*
* @author Angus Croll
* http://javascriptweblog.wordpress.com/2010/06/01/a-tracer-utility-in-2kb/
*/
String.prototype.times = function(count){
return count < 1 ? '' : new Array(count + 1).join(this);
}
p = function(s, l) { return (l = ~~(s.length / 2)), s.substr(0, l).split('').reverse().join('') == s.substr(-~l) }
function rossify(sentence){
var re = /\w+/g, words = sentence.match(re);
return sentence.replace(re, function(){
return words.pop();
});
}
// > rossify('hi, my name is aeron. today i am good!');
// "good, am i today aeron. is name my hi!"
@aglemann
aglemann / jquery.stretch.js
Created January 27, 2011 15:31
jQuery Stretch Plugin
/*
* jQuery Stretch Plugin
* http://sistersylvie.com/js_lab/stretchy/
* Copyright (c) 2010 Tommy Hunke
* Version: 1.0 (05/23/2010)
* Licensed under the MIT licenses:
* http://www.opensource.org/licenses/mit-license.php
* Requires: jQuery v1.3 or later
*/
;(function($){