Skip to content

Instantly share code, notes, and snippets.

Adam Brewer adamcbrewer

Block or report user

Report or block adamcbrewer

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
@adamcbrewer
adamcbrewer / ga-tracker.js
Last active Dec 14, 2015 — forked from stugoo/event-tracker-modernizr.js
JS: GA tracker with support for Modernizr tests
View ga-tracker.js
/**
* A Google Analytics event tracking proxy.
*
* This lobal allows us to do tests for the instantiation of _gaq
* and also allows us easier debugging in a test environment.
*
* Hat-tip to @stugoo for most the self-invoked function features!
*
*/
window.track = function (args) {
@adamcbrewer
adamcbrewer / rAF.js
Created Dec 3, 2012 — forked from paulirish/rAF.js
JS: requestAnimationFrame polyfill
View rAF.js
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller
// fixes from Paul Irish and Tino Zijdel
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
@adamcbrewer
adamcbrewer / throttle.sh
Created Oct 11, 2012 — forked from apinstein/ipfw bandwidth throttle.sh
SH: ipfw bandwidth throttling
View throttle.sh
#!/bin/sh
#
# Use ipfw to throttle bandwidth.
# usage:
# ./throttle.sh # Throttle at default (60KB/s)
# ./throttle.sh 5 # Throttle at custom speed (5KB/s)
# ./throttle.sh off # Turn throttling off
# flush rules
ipfw del pipe 1
You can’t perform that action at this time.