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:
| # Do not name this twisted.py or Python's loader will get | |
| # confused! | |
| from twisted.web import proxy, http | |
| from twisted.internet import reactor | |
| from twisted.python import log | |
| import sys | |
| # log.startLogging(sys.stdout) |
| var http = require('http'); | |
| var url = require('url'); | |
| http.createServer(function (req1, res1) { | |
| var tmp = url.parse(req1.url); | |
| var options = { | |
| "host": tmp.hostname, | |
| "port": tmp.port || 80, | |
| "path": tmp.pathname + (tmp.search ? tmp.search : ''), | |
| "method": req1.method, |
| var http = require("http"), | |
| url = require("url"), | |
| path = require("path"), | |
| fs = require("fs") | |
| port = process.argv[2] || 8888; | |
| http.createServer(function(request, response) { | |
| var uri = url.parse(request.url).pathname | |
| , filename = path.join(process.cwd(), uri); |
| function doHash(str, seed) { | |
| var m = 0x5bd1e995; | |
| var r = 24; | |
| var h = seed ^ str.length; | |
| var length = str.length; | |
| var currentIndex = 0; | |
| while (length >= 4) { | |
| var k = UInt32(str, currentIndex); | |
There are a number of additional dependencies required for getting things installed on OS X. Starting with a blank slate OS X machine, this is the process it takes:
# Install Xcode Command Line Tools
# Install Homebrew
ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
| 'use strict'; | |
| var q = require('q'); | |
| /** | |
| * Constructs a function that proxies to promiseFactory | |
| * limiting the count of promises that can run simultaneously. | |
| * @param promiseFactory function that returns promises. | |
| * @param limit how many promises are allowed to be running at the same time. | |
| * @returns function that returns a promise that eventually proxies to promiseFactory. |
| #!/bin/bash | |
| # Install sleepwatcher | |
| sudo cp /usr/local/Cellar/sleepwatcher/2.2/de.bernhard-baehr.sleepwatcher-20compatibility.plist /Library/LaunchAgents/ | |
| sudo cp /usr/local/Cellar/sleepwatcher/2.2/etc/sleepwatcher/rc.* /etc/c | |
| # Add bluetooth script to /etc/rc.wakeup (the script requires root) | |
| sudo tee -a /etc/rc.wakeup <<EOF | |
| kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport && sleep 3 && kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport | |
| EOF |