Skip to content

Instantly share code, notes, and snippets.

View jimmont's full-sized avatar

Jim Montgomery jimmont

View GitHub Profile
@jimmont
jimmont / LICENSE.txt
Last active August 29, 2015 21:35 — forked from tnightingale/LICENSE.txt
Christchurch 2010 Timeline
The MIT License (MIT)
Copyright (c) 2014 TODO
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@jimmont
jimmont / rAF.js
Last active December 17, 2015 03:29 — forked from paulirish/rAF.js
// paulirish, emoller et al. MIT license
window.requestAnimationFrame = window.requestAnimationFrame || function(callback, element){
var fn, cfn, w = window, lastTime = 0, v, vendors = 'webkit,moz,ms,o'.split(',');
while(!fn && (v = vendors.shift())){
fn = w[v+'RequestAnimationFrame'];
cfn = w[v+'CancelAnimationFrame'] || w[v+'CancelRequestAnimationFrame'];
};
w.requestAnimationFrame = fn || function(callback, element){
var id, currTime = new Date().getTime(), timeToCall = Math.max(0, 16 - (currTime - lastTime));