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:
| # Thanks to: http://stackoverflow.com/questions/8566667/split-javascript-array-in-chunks-using-underscore-js | |
| _.mixin | |
| chunk: (array, unit) -> | |
| result = _.groupBy array, (element, index) -> | |
| Math.floor index / unit | |
| _.toArray result | |
| data = [1,2,3,4,5,6,7,8,9] | |
| # We pass the array and the size of the chunk | |
| list = _.chunk data, 2 |
| import util.parsing.json.JSON | |
| import io.Source | |
| import scala.language.dynamics | |
| object Example extends App{ | |
| val json = """{ | |
| "name" : "Adam Slodowy", | |
| "active": "true", | |
| "roles" : [ "teacher", "admin" ], |
| // Dependency resolution, adapted from https://gist.github.com/1232505/f16308bc14966c8d003c2686b1c258ec41303c1f | |
| function resolve(graph) { | |
| var sorted = [], // sorted list of IDs ( returned value ) | |
| visited = {}; // hash: id of already visited node => true | |
| // 2. topological sort | |
| Object.keys(graph).forEach(function visit(name, ancestors) { | |
| if (!Array.isArray(ancestors)) ancestors = []; | |
| ancestors.push(name); | |
| visited[name] = true; |
| (function () { | |
| App.Views.PopoverView = Backbone.View.extend({ | |
| initialize: function (options) { | |
| _.bindAll(this, "render", "setContent", "show", "hide", "toggle", "destroy", "remove"); | |
| this.offsetTop = 30; | |
| this.offsetLeft = 0; |
| ----- Esc ----- | |
| Quick change directory: Esc + c | |
| Quick change directory history: Esc + c and then Esc + h | |
| Quick change directory previous entry: Esc + c and then Esc + p | |
| Command line history: Esc + h | |
| Command line previous command: Esc + p | |
| View change: Esc + t (each time you do this shortcut a new directory view will appear) | |
| Print current working directory in command line: Esc + a | |
| Switch between background command line and MC: Ctrl + o | |
| Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name |
| package object mail { | |
| implicit def stringToSeq(single: String): Seq[String] = Seq(single) | |
| implicit def liftToOption[T](t: T): Option[T] = Some(t) | |
| sealed abstract class MailType | |
| case object Plain extends MailType | |
| case object Rich extends MailType | |
| case object MultiPart extends MailType |
| /** Akshaal, 2012. http://akshaal.info */ | |
| import language.experimental.macros | |
| import scala.reflect.macros.Context | |
| import scala.annotation.Annotation | |
| /** | |
| * Macros for traversing over annotated elements. | |
| * | |
| * See http://www.akshaal.info/2012/08/scala-210-annotated-fields-macro.html for more information. |
#Mac OS X