This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
var easing = { | |
elastic: function(pos){return -1*Math.pow(4,-8*pos)*Math.sin((pos*6-1)*(2*Math.PI)/2)+1}, | |
swingFromTo:function(pos){var s=1.70158;return((pos/=0.5)<1)?0.5*(pos*pos*(((s*=(1.525))+1)*pos-s)):0.5*((pos-=2)*pos*(((s*=(1.525))+1)*pos+s)+2)}, | |
swingFrom:function(pos){var s=1.70158;return pos*pos*((s+1)*pos-s)}, | |
swingTo:function(pos){var s=1.70158;return(pos-=1)*pos*((s+1)*pos+s)+1}, | |
bounce:function(pos){if(pos<(1/2.75)){return(7.5625*pos*pos)}else{if(pos<(2/2.75)){return(7.5625*(pos-=(1.5/2.75))*pos+0.75)}else{if(pos<(2.5/2.75)){return(7.5625*(pos-=(2.25/2.75))*pos+0.9375)}else{return(7.5625*(pos-=(2.625/2.75))*pos+0.984375)}}}}, | |
bouncePast:function(pos){if(pos<(1/2.75)){return(7.5625*pos*pos)}else{if(pos<(2/2.75)){return 2-(7.5625*(pos-=(1.5/2.75))*pos+0.75)}else{if(pos<(2.5/2.75)){return 2-(7.5625*(pos-=(2.25/2.75))*pos+0.9375)}else{return 2-(7.5625*(pos-=(2.625/2.75))*pos+0.984375)}}}}, | |
easeFromTo:function(pos){if((pos/=0.5)<1){return 0.5*Math.pow(pos,4)}return -0.5*((pos-=2)*Math.po |
// Cross browser, backward compatible solution | |
(function( window, Date ) { | |
// feature testing | |
var raf = window.mozRequestAnimationFrame || | |
window.webkitRequestAnimationFrame || | |
window.msRequestAnimationFrame || | |
window.oRequestAnimationFrame; | |
window.animLoop = function( render, element ) { | |
var running, lastFrame = +new Date; |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
(function (name, definition){ | |
if (typeof define === 'function'){ // AMD | |
define(definition); | |
} else if (typeof module !== 'undefined' && module.exports) { // Node.js | |
module.exports = definition(); | |
} else { // Browser | |
var theModule = definition(), global = this, old = global[name]; | |
theModule.noConflict = function () { | |
global[name] = old; | |
return theModule; |
/* | |
* Another ES6 Proxy experiment. This one creates a stack whose underlying | |
* implementation is an array. The proxy is used to filter out everything | |
* but "push", "pop", and "length" from the interface, making it a pure | |
* stack where you can't manipulate the contents. | |
*/ | |
var Stack = (function(){ | |
var stack = [], |
""" | |
An abstract syntax tree visitor for building control flow graphs for ECMAScript | |
programs and functions. | |
""" | |
from bigrig.visitor import NodeVisitor | |
from bigrig.node import Node | |
from bigrig import ast | |
from .graph import Digraph |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Mathieu 'p01' Henri http://www.p01.org/releases/ | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
DO WTF YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Alexey Silin <[email protected]> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WTF YOU WANT TO PUBLIC LICENSE |
var ntwitter = require("ntwitter"), | |
growl = require("growl"); | |
var twitter = new ntwitter({ | |
// fill in w/ keys from https://dev.twitter.com/apps/new | |
consumer_key: null, | |
consumer_secret: null, | |
access_token_key: null, | |
access_token_secret: null | |
}); |
#!/usr/bin/env node | |
(function () { | |
"use strict"; | |
var coveraje = require("coveraje").coveraje, | |
fs = require("fs"), | |
path = require("path"), | |
jshfilePath = path.resolve("../jshint.js"); | |