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:
| /** | |
| * Once this is running open your browser and hit http://localhost | |
| * You'll see that the request hits the proxy and you get the HTML back | |
| */ | |
| 'use strict'; | |
| const net = require('net'); | |
| const http = require('http'); |
| module.exports = { | |
| "AWS": { | |
| "Region": "us-east-1", | |
| "ClientId": "304laiduvj1ld6ls8s2lsjfipa", | |
| "UserPoolId": "us-east-1_aaksjfhTo", | |
| "IdentityPoolId": "us-east-1:018b7af4-9384-8afe-019d-013cc0192d001", | |
| "LoginEndpoint": "cognito-idp.us-east-1.amazonaws.com/us-east-1_aaksjfhTo" | |
| } | |
| } |
| // Ever needed to escape '\n' as '\\n'? This function does that for any character, | |
| // using hex and/or Unicode escape sequences (whichever are shortest). | |
| // Demo: http://mothereff.in/js-escapes | |
| function unicodeEscape(str) { | |
| return str.replace(/[\s\S]/g, function(character) { | |
| var escape = character.charCodeAt().toString(16), | |
| longhand = escape.length > 2; | |
| return '\\' + (longhand ? 'u' : 'x') + ('0000' + escape).slice(longhand ? -4 : -2); | |
| }); | |
| } |
| // ## $.withAdvice | |
| // | |
| // Borrowed by [Flight](https://github.com/flightjs/flight). | |
| // | |
| // `withAdvice` is a mixin that defines `before`, `after` and `around` methods. | |
| // | |
| // These can be used to modify existing functions by adding custom code. All | |
| // components have advice mixed in to their prototype so that mixins can augment | |
| // existing functions without requiring knowledge of the original | |
| // implementation. |
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.zshrc | |
| . ~/.zshrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... | |
| curl https://www.npmjs.org/install.sh | sh |
| [user] | |
| name = Alexander Rinass | |
| email = [email protected] | |
| [core] | |
| editor = mate -w | |
| [github] | |
| user = alexrinass | |
| [color] | |
| branch = auto | |
| diff = auto |