I created this gist so at my current work, I could pass around this patch file to get local cachebusting working for development.
function walk(a,b){var c,d,e=0;do c||(c=b.call(a,e)===!1),!c&&(d=a.firstChild)?++e:(d=a.nextSibling)?c=0:(d=a.parentNode,--e,c=1),a=d;while(e>0)}walk(document.documentElement,function(){if(this.nodeType==3)this.nodeValue=this.nodeValue.replace(/./g,"ANTHONY")}); |
The original universal static instagram
(back when it was still a jekyll plugin)
Linked to from http://lukecod.es/2011/11/27/instagram-liquid-tag-plugin-for-jekyll-and-octopress/
Replace all characters in text nodes that are not spaces and then "shake" the body
Linked to from http://lukecod.es/2012/02/23/shake-n-bake-console-settimeout-bomb/
Linked to from http://lukecod.es/2014/01/25/tweet-your-bracket/
var pointsFor = 0, pointsAgainst = 0; | |
jQuery('.mod-content .game-schedule .score').each(function() { | |
var score = jQuery(this), | |
win = score.prev().hasClass('win'), | |
scoreText = score.children('a').text().split('-'), | |
s1 = parseInt(scoreText[0], 0), | |
s2 = parseInt(scoreText[1], 0); | |
pointsFor += (win) ? s1 : s2; | |
pointsAgainst += (win) ? s2 : s1; |
/*global require console */ | |
var _ = require('underscore'), | |
fs = require('fs'), | |
data = JSON.parse(fs.readFileSync('./data.json', 'utf-8')).data; | |
_.each(data, function(item) { | |
var newJson = item[0], | |
files = item[1]; |
/* Got this from Instagram Profile Pages http://d36xtkk24g8jdx.cloudfront.net/bluebar/c535104/scripts/bluebar.js */ | |
function get_param(name) { | |
return decodeURI( | |
(RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1] | |
); | |
} |
Linked to from http://lukecod.es/2012/11/18/random-problem-of-the-night/
This is a node.js crawler that will crawl an entire site (using crawl) to find all internal links in the entire site. It will then test each unique internal link for the presence of an optional string and then the query string into an object. All values with the same key from the query string will be pushed to an array for that key.