Skip to content

Instantly share code, notes, and snippets.

View sjwilliams's full-sized avatar

Josh Williams sjwilliams

View GitHub Profile
@sjwilliams
sjwilliams / GIF-Screencast-OSX.md
Created July 14, 2017 14:50 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

const isAutoplaySupported = function (callback) {
var timeout;
var waitTime = 200;
var retries = 5;
var currentTry = 0;
var elem = document.createElement('video');
var elemStyle = elem.style;
function testAutoplay(arg) {
currentTry++;
@sjwilliams
sjwilliams / grid.jsx
Created January 31, 2019 21:43 — forked from hughsk/grid.jsx
Generating Large Image Grids in Photoshop using Javascript
var shuffleAndValidateFiles = function(files) {
var F = new Array();
while (files.length > 0) {
var N = Math.floor(Math.random()*files.length);
if ((files[N] instanceof File) && !files[N].hidden) {
F.push(files[N]);
}
files.splice(N,1);