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:
| // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
| // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
| // requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
| // MIT license | |
| (function() { | |
| var lastTime = 0; | |
| var vendors = ['ms', 'moz', 'webkit', 'o']; |
| < | |
| %3C | |
| < | |
| < | |
| < | |
| < | |
| < | |
| < | |
| < | |
| < |
| var parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |
| // This is from my comment here: http://wolfram.kriesing.de/blog/index.php/2008/javascript-remove-element-from-array/comment-page-2#comment-466561 | |
| /* | |
| * How to delete items from an Array in JavaScript, an exhaustive guide | |
| */ | |
| // DON'T use the delete operator, it leaves a hole in the array: | |
| var arr = [4, 5, 6]; | |
| delete arr[1]; // arr now: [4, undefined, 6] |
| // Queue of Backbone.Model save()s so that we don't issue multiple POSTs while waiting for | |
| // the first one to come back. The first save() will always POST and the second will always PUT now. | |
| // https://github.com/documentcloud/backbone/issues/345 | |
| // https://gist.github.com/1037984 and https://gist.github.com/gists/3148064 | |
| (function() { | |
| function proxyAjaxEvent(event, options, dit) { | |
| var eventCallback = options[event]; | |
| options[event] = function() { | |
| // check if callback for event exists and if so pass on request | |
| if (eventCallback) { eventCallback(arguments) } |
| var xhr = _this = this, | |
| new XMLHttpRequest(), | |
| fd = new FormData(), | |
| key = this.email + '/' + epoch.toString() + '/' + file.name; | |
| // Populate the Post paramters. | |
| fd.append('key', key); | |
| fd.append('AWSAccessKeyId', 'XXXXXXXXXXXX'); | |
| fd.append('acl', 'private'); | |
| fd.append('success_action_redirect', "https://attachments.me/upload_callback") |
| /** | |
| * adds a bindGlobal method to Mousetrap that allows you to | |
| * bind specific keyboard shortcuts that will still work | |
| * inside a text input field | |
| * | |
| * usage: | |
| * Mousetrap.bindGlobal('ctrl+s', _saveChanges); | |
| */ | |
| Mousetrap = (function(Mousetrap) { | |
| var _global_callbacks = {}, |
| # Class: base::swap | |
| # | |
| # This class manages swapspace on a node. | |
| # | |
| # Parameters: | |
| # - $ensure Allows creation or removal of swapspace and the corresponding file. | |
| # - $swapfile Defaults to /mnt which is a fast ephemeral filesystem on EC2 instances. | |
| # This keeps performance reasonable while avoiding I/O charges on EBS. | |
| # - $swapfilesize Size of the swapfile in MB. Defaults to memory size, but see Requires. | |
| # |
| var Zap = { | |
| new_client_pre_write: function(bundle) { | |
| var data = { | |
| status: bundle.request.data.status, | |
| name: bundle.request.data.name, | |
| description: '', | |
| contacts: [ | |
| { | |
| name: bundle.request.data.contacts__name | |
| } |