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:
| license: gpl-3.0 | |
| redirect: https://observablehq.com/@d3/collision-detection/2 |
| # RVM | |
| export PATH="./bin:$PATH" | |
| [[ -s "/Users/Steven/.rvm/scripts/rvm" ]] && source "/Users/Steven/.rvm/scripts/rvm" | |
| # Git command and branch name tab-completion | |
| source ~/git-completion.bash | |
| # Check if directory is a Git repo | |
| # Customized from http://vvv.tobiassjosten.net/git/add-current-git-branch-to-your-bash-prompt | |
| git_prompt () |
| /** | |
| * Create a debugger with the given `name`. | |
| * | |
| * @param {String} name | |
| * @return {Type} | |
| * @api public | |
| */ | |
| function debug(name) { | |
| var now = Date.now(); |
| import Stream._ | |
| /** A possibly finite stream that repeatedly applies a given function to a start value. | |
| * | |
| * @param start the start value of the stream | |
| * @param f the function that's repeatedly applied | |
| * @return the stream returning the possibly finite sequence of values `start, f(start), f(f(start)), ...` | |
| */ | |
| def iterate[A](f: A => A, a: A): Stream[A] = unfold((x: A) => Some((x, f(x))), a) |
| // Scraping Made Easy with jQuery and SelectorGadget | |
| // (http://blog.dtrejo.com/scraping-made-easy-with-jquery-and-selectorga) | |
| // by David Trejo | |
| // | |
| // Install node.js and npm: | |
| // http://joyeur.com/2010/12/10/installing-node-and-npm/ | |
| // Then run | |
| // npm install jsdom jquery http-agent | |
| // node numresults.js | |
| // |
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| 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 |
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |