Skip to content

Instantly share code, notes, and snippets.

View ethagnawl's full-sized avatar
🐢

Pete Doherty ethagnawl

🐢
View GitHub Profile
@ethagnawl
ethagnawl / rAF.js
Created March 4, 2014 17:50 — forked from paulirish/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
// MIT license
"use strict";
define(function () {
@ethagnawl
ethagnawl / rAF.js
Created March 4, 2014 17:40 — forked from paulirish/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
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
#!/bin/bash
wget "https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz"
tar -xf libevent-2.0.21-stable.tar.gz
./configure
make
make verify
sudo make install
@ethagnawl
ethagnawl / onerror.coffee
Last active December 9, 2015 17:18 — forked from anonymous/gist:4302682
An onerror handler that's a helluva lot more useful than `... catch(e) { alert(e) }`.You can easily hook this into a custom Google Analytics event to log your app's errors. Inspired by: http://bytes.com/topic/javascript/answers/90742-try-catch-error-handling-display-line-number
onerror = (err, file, line) ->
logger """ # console.log, alert, whatever
The following error occured: #{err}
In file: #{file}
At line: #{line}
"""