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']; |
| // Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
| // jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
| // author: Pawel Kozlowski | |
| var myApp = angular.module('myApp', []); | |
| //service style, probably the simplest one | |
| myApp.service('helloWorldFromService', function() { | |
| this.sayHello = function() { | |
| return "Hello, World!" |
| /** | |
| * Filter out hard-coded width, height attributes on all images in WordPress. | |
| * https://gist.github.com/4557917 | |
| * | |
| * This version applies the function as a filter to the_content rather than send_to_editor. | |
| * Changes made by filtering send_to_editor will be lost if you update the image or associated post | |
| * and you will slowly lose your grip on sanity if you don't know to keep an eye out for it. | |
| * the_content applies to the content of a post after it is retrieved from the database and is "theme-safe". | |
| * (i.e., Your changes will not be stored permanently or impact the HTML output in other themes.) | |
| * |
| document.addEventListener('keyup', function (e) { | |
| var keyCode = e.keyCode || e.which, | |
| arrow = { left: 37, up: 38, right: 39, down: 40 }; | |
| switch (keyCode) { | |
| case arrow.left: | |
| console.log(keyCode); | |
| break; | |
| case arrow.up: |
| /* REQUIRES http://modernizr.com/download/#-addtest-json-script_defer-load */ | |
| (function(window, document, Modernizr, undefined) { | |
| 'use strict'; | |
| Modernizr.addTest('jQueryVersion', function() { | |
| return ( | |
| Modernizr.json && | |
| Modernizr.scriptdefer && |
| module.exports = { | |
| options: { | |
| separator: ';' | |
| }, | |
| dist: { | |
| src: ['src/**/*.js'], | |
| dest: 'dist/<%= pkg.name %>.js' | |
| } | |
| } |
| /** | |
| * Get a random floating point number between `min` and `max`. | |
| * | |
| * @param {number} min - min number | |
| * @param {number} max - max number | |
| * @return {number} a random floating point number | |
| */ | |
| function getRandomFloat(min, max) { | |
| return Math.random() * (max - min) + min; | |
| } |
| #!/usr/bin/env bash | |
| # MIT © Sindre Sorhus - sindresorhus.com | |
| # git hook to run a command after `git pull` if a specified file was changed | |
| # Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`. | |
| changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
| check_run() { | |
| echo "$changed_files" | grep --quiet "$1" && eval "$2" |
| /** | |
| * The pseudo-element 'content' property doesnt accept normal (») style | |
| * HTML entities. These variables below easy the pain of looking up the HEX codes... | |
| * | |
| * Referenced from http://www.danshort.com/HTMLentities/ | |
| * | |
| * TODO: Add all the other entities? Worth it? Some day? Maybe? | |
| */ | |
| // Punctuation |