Skip to content

Instantly share code, notes, and snippets.

View luhmann's full-sized avatar

Jan Florian Dietrich luhmann

View GitHub Profile
@luhmann
luhmann / imageExtractSprite.sh
Last active December 30, 2015 05:39
Extracts the images of a movie with ffmpeg and combines them into a sprite with imagemagick
#extract images from -ss timestamp at duration -t, -s scale to size
ffmpeg -i "source.mp4" -ss 00:00:00 -t 00:00:03 -s 468x264 -f image2 -vf fps=fps=12 img%03d.jpg
#convert to sprite map with imagemagick
convert *.jpg -append sprites.jpg
@luhmann
luhmann / uri.js
Created July 8, 2013 12:41 — forked from jlong/uri.js
JS: Simple JS URL-Parser
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"