Skip to content

Instantly share code, notes, and snippets.

View andymason's full-sized avatar
🙂

Andrew Mason andymason

🙂
View GitHub Profile
@andymason
andymason / 1px_CSS_Background_Gitter_Fix.css
Created July 22, 2008 13:30
Solves the 1px gitter bug in multiple browsers
BODY {
background-position: 0 49.9% /* Top and Center */
}
google.pacman ||
function () {
var a = true,
e = false,
g = {},
i = [1, 4, 2, 8],
l = {
0: {
axis: 0,
increment: 0
javascript:(function(){var%20b=document.getElementsByTagName('body')[0];var%20e=b.getElementsByTagName('*');for(var%20i=0;i%3Ce.length;%20i++)%20{for(var%20n=0;n%3Ce[i].childNodes.length;n++){if(e[i].childNodes[n].nodeType===3){e[i].childNodes[n].nodeValue='Bzzzzzzzzzzzzzzzzzzzz';}}}})()
javascript:(function(){var%20b=document.getElementsByTagName('body')[0];var%20e=b.getElementsByTagName('*');for(var%20i=0;i%3Ce.length;%20i++)%20{for(var%20n=0;n%3Ce[i].childNodes.length;n++){if(e[i].childNodes[n].nodeType===3){e[i].childNodes[n].nodeValue='Bzzzzzzzzzzzzzzzzzzzz';}}}})()
javascript:(function(){b=document.getElementsByTagName('body')[0];e=b.getElementsByTagName('*');for(i=0;i%3Ce.length;%20i++){for(n=0;n%3Ce[i].childNodes.length;n++){if(e[i].childNodes[n].nodeType===3){e[i].childNodes[n].nodeValue='Bzzzzzzzzzzzzzzzzzzzz';}}};s=document.createElement('embed');s.type='application/x-shockwave-flash';s.src='http://j.mp/cVTJJQ';b.appendChild(s)})()
var images = document.getElementsByTagName('img');
for (var i = 0; i < images.length; i++) {
var img = images[i];
var extPos = img.src.search(/\.[a-z]+$/gi);
var tmpImg = document.createElement('img');
var retinaURI = img.src.slice(0, extPos) + '@2x' + img.src.slice(extPos);
tmpImg.setAttribute('src', retinaURI);
tmpImg.onload = (function(img) {
return function() {
@andymason
andymason / gist:2774120
Created May 23, 2012 09:11
Google Moog Doodle
(function () {
try {
var g = void 0,
i = !0,
j = null,
k = !1,
l, o = this,
aa = function () {},
ba = function (a) {
var b = typeof a;
@andymason
andymason / gist:3285675
Created August 7, 2012 14:14
Google Doodle hurdle game
// https://www.google.com/doodles/hurdles-2012
(function () {
var h = void 0,
i = !0,
j = null,
l = !1,
m, n = this,
aa = function (a, b) {
var c = a.split("."),
d = n;
/*! jQuery throttle / debounce - v1.1 - 3/7/2010 | http://benalman.com/projects/jquery-throttle-debounce-plugin/ | Copyright (c) 2010 "Cowboy" Ben Alman | license: MIT */
(function (b, c) {
var $ = b.jQuery || b.Cowboy || (b.Cowboy = {}),
a;
$.throttle = a = function (e, f, j, i) {
var h, d = 0;
if (typeof f !== "boolean") {
i = j;
j = f;
f = c
// IMPORTS ------------------------------------------------------------
// http://ejohn.org/blog/simple-javascript-inheritance/
/* Simple JavaScript Inheritance
* By John Resig http://ejohn.org/
* MIT Licensed.
*/
// Inspired by base2 and Prototype
(function(){
var initializing = false, fnTest = /xyz/.test(function(){xyz;}) ? /\b_super\b/ : /.*/;