Skip to content

Instantly share code, notes, and snippets.

Aeron Glemann aglemann

Block or report user

Report or block aglemann

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
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);
}
@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 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!"
View gist:4029623
p = function(s, l) { return (l = ~~(s.length / 2)), s.substr(0, l).split('').reverse().join('') == s.substr(-~l) }
You can’t perform that action at this time.