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:
| /* The Grid ---------------------- */ | |
| .lt-ie9 .row { width: 940px; max-width: 100%; min-width: 768px; margin: 0 auto; } | |
| .lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; } | |
| .lt-ie9 .row.large-collapse .column, | |
| .lt-ie9 .row.large-collapse .columns { padding: 0; } | |
| .lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; } | |
| .lt-ie9 .row .row.large-collapse { margin: 0; } | |
| .lt-ie9 .column, .lt-ie9 .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; } | |
| .lt-ie9 .column.large-centered, .columns.large-centered { float: none; margin: 0 auto; } |
| gifify() { | |
| if [[ -n "$1" ]]; then | |
| if [[ $2 == '--good' ]]; then | |
| ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png | |
| time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif | |
| rm out-static*.png | |
| else | |
| ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif | |
| fi | |
| else |
| angular | |
| .module('ContentRepeat', []) | |
| .directive 'contentrepeat', ($compile) -> | |
| priority: 1000 | |
| terminal: true | |
| compile: (element, attr, linker) -> | |
| template = $compile(element.html()) | |
| element.empty() | |
| (scope, self, attr) -> |
| //express3.0 | |
| var express = require('express'); | |
| var app = express(); | |
| app.set('port', 3000); | |
| app.set('views', __dirname + '/views'); | |
| app.set('view engine', 'jade'); | |
| app.use(express.bodyParser()); | |
| app.use(express.methodOverride()); | |
| //session & cookie |
| # based on http://uberblo.gs/2011/06/high-performance-url-shortening-with-redis-backed-nginx | |
| # using code from http://stackoverflow.com/questions/3554315/lua-base-converter | |
| # "database scheme" | |
| # database 0: id ~> url | |
| # database 1: id ~> hits | |
| # database 2: id ~> [{referer|user_agent}] | |
| # database 3: id ~> hits (when id is not found) | |
| # database 4: id ~> [{referer|user_agent}] (when id is not found) | |
| # database 5: key "count" storing the number of shortened urls; the id is generated by (this number + 1) converted to base 62 |
| import socket | |
| import struct | |
| import json | |
| def unpack_varint(s): | |
| d = 0 | |
| for i in range(5): | |
| b = ord(s.recv(1)) | |
| d |= (b & 0x7F) << 7*i | |
| if not b & 0x80: |
| # File is named as '.sh' for highlighting. Don't actually run this (hash bang removed). | |
| # | |
| # First of all, you should stop using cygwin and just use a VM or install linux. | |
| # By continuing you acknowledge the fact your a nut. :-D | |
| # | |
| # If your having errors with Cygwin and NPM install packages such as: | |
| # npm ERR! tar "-mvxpf" "-" "--no-same-owner" | |
| # | |
| # Do the following: |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 Jed Schmidt <http://jed.is> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
| #! /bin/sh | |
| ### BEGIN INIT INFO | |
| # Provides: redis-server | |
| # Required-Start: $syslog | |
| # Required-Stop: $syslog | |
| # Should-Start: $local_fs | |
| # Should-Stop: $local_fs | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: redis-server - Persistent key-value db |