Skip to content

Instantly share code, notes, and snippets.

View gist:4029623
p = function(s, l) { return (l = ~~(s.length / 2)), s.substr(0, l).split('').reverse().join('') == s.substr(-~l) }
View gist:1574561
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 Jan 27, 2011
jQuery Stretch Plugin
View jquery.stretch.js
/*
* 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($){
View tracer.js
/* 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);
}