Skip to content

Instantly share code, notes, and snippets.

View shogunfighter's full-sized avatar

shogunfighter

View GitHub Profile
@shogunfighter
shogunfighter / cookies.js
Created November 17, 2016 10:32 — forked from CrocoDillon/cookies.js
Export your awesome module using AMD, CommonJS, Node.js or just as global.
/*
* Inspiration (well… copy pasting more or less) from:
* https://github.com/ScottHamper/Cookies/blob/0.3.1/src/cookies.js#L127-L140
*
* Thanks Scott!
*/
(function (global) {
'use strict';
var MyModule = function () {
@shogunfighter
shogunfighter / rAF.js
Last active August 29, 2015 14:22 — 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'];