This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
/** | |
* Converts an RGB color value to HSL. Conversion formula | |
* adapted from http://en.wikipedia.org/wiki/HSL_color_space. | |
* Assumes r, g, and b are contained in the set [0, 255] and | |
* returns h, s, and l in the set [0, 1]. | |
* | |
* @param Number r The red color value | |
* @param Number g The green color value | |
* @param Number b The blue color value | |
* @return Array The HSL representation |
// A bot for this silly demo: http://www.webdeveloperjuice.com/demos/jquery/snake_jquery.html | |
// Compile with http://closure-compiler.appspot.com/home set to Advanced Optimization | |
// | |
// Automatically runs when compiled statement is pasted into console. Type "win()" to run it again. | |
(window['win'] = function () { | |
// direction mappings | |
var i, dirs = ['up', 'right', 'down', 'left'], | |
diffs = [[-1, 0], [0, 1], [1, 0], [0, -1]]; // don't ask me why the coords are ordered [y,x] | |
window['t'] = 1; // next Turn direction if we hit a wall (opposite of last turn direction) | |
window['m'] = 0; // My internally tracked direction |