This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |