Skip to content

Instantly share code, notes, and snippets.

View gtzilla's full-sized avatar
🎯
Focusing

gregory tomlinson gtzilla

🎯
Focusing
View GitHub Profile
@gtzilla
gtzilla / install gist commandline
Created April 26, 2011 16:20
one liner for installing the gist commandline tool mac OSX
curl -s -L http://gt-co.de/hOaVwe > gist && chmod 755 gist && sudo mv gist /usr/local/bin/gist
//
// CallerQueue.js
// 7codes
//
// Created by gregory tomlinson on 2011-05-10.
// Copyright 2011 the public domain. All rights reserved.
//
/*
Dependency, jQuery 1.5.2+
//
// rokuAttack.js
// 7codes
//
// Created by gregory tomlinson on 2011-05-08.
// Copyright 2011 the public domain. All rights reserved.
//
/*
Dependency
//
// BitsMetricViews.js
// bitly2
//
// Created by gregory tomlinson on 2011-05-12.
// Copyright 2011 the public domain. All rights reserved.
//
/*
Usage:
//
// BitsMetaMetric.js
// bitly2
//
// Created by gregory tomlinson on 2011-05-11.
// Copyright 2011 the public domain. All rights reserved.
//
/*
@gtzilla
gtzilla / SeriesQueue.js
Created July 7, 2011 05:53
Just a call queue based around the webkit animation frame
/*
* SeriesQueue
* author: gregory tomlinson
* */
(function(window, undefined) {
// If a method returns true, the motion queue continues animation
// by default, functions return null, meaning empty funcs
// will not animate, instead, they will execute once,
/*
*
* setTimeout can take more than 2 arguments. args > 2 will be passed to method in arg position 1
* setTimeout(myMethod, 10, "one", { "foo" : "bar" }
*
* */
function myMethod( param1, param2 ) {
console.log(arguments);
}
// utility string parse function
function out( str, options ) {
for(k in options) {
str=str.replace(/%\{([a-zA-Z0-9-]{1,}?)\}/mi, function(m, key ){
return options[key];
});
}
return str;
}
/*
*
*
* file: animator.js
* author: gregory tomlinson
* desc: handy scaffolding for doing continous animations
*
* the requestion animation frame works very well as a lazy timer
* it's cpu cycles are low and it informs the browser the
* intention is to change the DOM
/*
*
*
* file: raft.js
* R.A.F.T.
*
* Request
* Animation
* Frame
* Timer/Template