OS X Screencast to animated GIF
This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
Instructions
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
| // not like this... | |
| class Foo { | |
| get bar () { | |
| return arguments | |
| } | |
| } | |
| var foo = new Foo() |
| ❯ node -v | |
| v6.3.1 | |
| ~/forks/highlights remotes/ashleygwilliams/first-mate-6.0.0 | |
| ❯ npm i | |
| npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue | |
| npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue | |
| npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue | |
| npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue | |
| npm WARN prefer global [email protected] should be installed with -g |
| ❯ node cli.js ../../electron/electron/docs | standard-summary | |
| 311 Extra semicolon | |
| 22 'app' is not defined | |
| 16 'win' is not defined | |
| 16 'BrowserWindow' is not defined | |
| 11 'webview' is not defined | |
| 11 Expected { after 'if' condition | |
| 10 Missing space before function parentheses | |
| 9 'win' is defined but never used | |
| 8 'session' is not defined |
| { seq: 7114, | |
| id: 'jshint-tap-simple', | |
| changes: [ { rev: '1-5922f82150bad1218d420cea24e7a4c9' } ], | |
| doc: | |
| { _id: 'jshint-tap-simple', | |
| _rev: '1-5922f82150bad1218d420cea24e7a4c9', | |
| name: 'jshint-tap-simple', | |
| description: 'tap output for jshint', | |
| 'dist-tags': { latest: '1.0.2' }, | |
| versions: { '1.0.1': [Object], '1.0.2': [Object] }, |
| ❯ node -v | |
| v6.2.0 | |
| ❯ npm show . version | |
| 5.1.1 | |
| ❯ npm test | |
| > [email protected] test /Users/zeke/forks/first-mate | |
| > grunt test |
| /Users/zeke/electron/electron/default_app/default_app.js:1:1: Use the global form of 'use strict'. | |
| /Users/zeke/electron/electron/default_app/main.js:1:1: Use the global form of 'use strict'. | |
| /Users/zeke/electron/electron/default_app/main.js:31:5: Unexpected use of continue statement | |
| /Users/zeke/electron/electron/default_app/main.js:33:5: Unexpected use of continue statement | |
| /Users/zeke/electron/electron/default_app/main.js:232:1: Expected a function expression. | |
| /Users/zeke/electron/electron/default_app/main.js:264:7: Don't use process.exit(); throw an error instead. | |
| /Users/zeke/electron/electron/default_app/main.js:266:7: Unexpected console statement. | |
| /Users/zeke/electron/electron/default_app/main.js:272:1: Expected a function expression. | |
| /Users/zeke/electron/electron/default_app/main.js:276:1: Expected a function expression. | |
| /Users/zeke/electron/electron/default_app/main.js:278:5: Don't use process.exit(); throw an error instead. |
| npm install -g node-icns nativefier | |
| curl -o cat.png https://octodex.github.com/images/adventure-cat.png | |
| nicns --in cat.png --out cat.icns | |
| echo "console.log('whoa script injection')" > inject.js | |
| nativefier --name "GitHub Gmail" --icon cat.icns --inject inject.js https://inbox.google.com | |
| rm -rf /Applications/GitHub\ Gmail.app | |
| mv GitHub\ Gmail-darwin-x64/GitHub\ Gmail.app /Applications/ | |
| open /Applications/GitHub\ Gmail.app |
| /* | |
| Variation of http://stackoverflow.com/a/11508164/1956065 | |
| Follow up to https://twitter.com/johnjcz/status/670365691329970176 | |
| Inspired by UI of http://www.colorhexa.com/ | |
| */ | |
| function bestTextColor(hex) { | |
| hex = hex.replace('#', ''); | |
| var bigint = parseInt(hex, 16); |