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:
var React = require('react'); | |
var cx = require('classnames'); | |
var vjs = require('video.js'); | |
var _forEach = require('lodash/collection/forEach'); | |
var _debounce = require('lodash/function/debounce'); | |
var _defaults = require('lodash/object/defaults'); | |
var DEFAULT_HEIGHT = 800; | |
var DEFAULT_WIDTH = 600; | |
var DEFAULT_ASPECT_RATIO = (9 / 16); |
var traverse = function(o, fn) { | |
for (var i in o) { | |
fn.apply(this,[i,o[i]]); | |
if (o[i] !== null && typeof(o[i])=="object") { | |
traverse(o[i], fn); | |
} | |
} | |
} | |
// usage |
var gulp = require('gulp'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var source = require('vinyl-source-stream'); | |
var buffer = require('vinyl-buffer'); | |
var browserify = require('browserify'); | |
var watchify = require('watchify'); | |
var babel = require('babelify'); | |
function compile(watch) { | |
var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel)); |
document.getElementsByTagName('button')[0].onclick = function () { | |
scrollTo(document.body, 0, 1250); | |
} | |
function scrollTo(element, to, duration) { | |
var start = element.scrollTop, | |
change = to - start, | |
currentTime = 0, | |
increment = 20; | |
function map (arr, func) { | |
return Promise.resolve().then(function () { | |
return arr.map(function (el) { return func(el) }) | |
}).all() | |
} | |
function mapSeries (arr, func) { | |
let currentPromise = Promise.resolve() | |
let promises = arr.map(function (el) { | |
return currentPromise = currentPromise.then(function () { |
/* | |
Given a date, tzAbbr returns a short, friendly name for the | |
user's time zone on that date, or an empty string if their | |
client's Intl support is missing or incomplete. | |
For example, a user in New York might see: | |
tzAbbr(new Date()) // => "EST" | |
Time zones are locale-dependent. Users traveling outside of |
require.config({ | |
baseUrl: '/backbone-tests/', | |
paths: { | |
'jquery' : '/app/libs/jquery', | |
'underscore' : '/app/libs/underscore', | |
'backbone' : '/app/libs/backbone', | |
'mocha' : 'libs/mocha', | |
'chai' : 'libs/chai', | |
'chai-jquery' : 'libs/chai-jquery', | |
'models' : '/app/models' |
These instructions work for the Raspberry Pi running Raspbian (hard float) and create a hardware optimized version of NodeJS for the Raspberry PI, (and include a working install and NPM!!!):
Install Raspbian - http://www.raspberrypi.org/downloads
Install the necessary dependecies:
sudo apt-get install git-core build-essential
(If you just installed git then you need to administer your git identity first, else adding the patches below will fail!!!)