Skip to content

Instantly share code, notes, and snippets.

View gka's full-sized avatar
🐢

Gregor Aisch gka

🐢
View GitHub Profile
@gka
gka / make-animated-gifs-using-ffmpeg.md
Last active January 16, 2024 22:03
how to make a nice GIF from png frames

Make sure ffmpeg is up-to-date:

brew update
brew upgrade ffmpeg

Convert a MOV into frames. Tweak the 2/1 if you want more or fewer frames.

@gka
gka / plot.png
Last active April 5, 2024 03:02
visualize git logs accross multiple repositories
plot.png
@gka
gka / multi-crowbar.js
Last active April 29, 2021 21:44
like svg-crowbar, but for multiple svg elements!
var multiCrowbar = (function() {
/*
* SVG Export
* converts html labels to svg text nodes
* will produce incorrect results when used with multi-line html texts
*
* Author: Gregor Aisch
* based on https://github.com/NYTimes/svg-crowbar/blob/gh-pages/svg-crowbar-2.js
*/
@gka
gka / .block
Last active June 30, 2016 00:37 — forked from mbostock/.block
Natural Earth
license: gpl-3.0
function tomp3() { for f in "$@"; ffmpeg -i $f -acodec libmp3lame -aq 4 "`basename $f .m4a`.mp4"; }
@gka
gka / .block
Last active April 20, 2018 10:46
d3.geo.statePlane
border: no
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gka
gka / git-go
Created May 11, 2016 20:45
git-go
#!/usr/bin/env node
var cmds = [];
if (process.argv.length < 3) {
console.log('You need to provide a commit message required!');
process.exit(-1);
}
cmds.push('git add -A');
cmds.push('git add -u');
@gka
gka / clean-ai2html-svg-artboard.js
Created December 23, 2015 16:55
Script to remove markup for hidden elements from SVG files, for use with ai2html
var fs = require('fs'),
cheerio = require('cheerio'),
fn = process.argv[2];
cleanSVGArtboard(fn);
function cleanSVGArtboard(svgFileName, svg_embed_images) {
if (!fs.existsSync(svgFileName)) return;
var svgText = fs.readFileSync(svgFileName, 'utf-8');
@gka
gka / readme.md
Last active December 10, 2015 17:04
X-13ARIMA-SEATS binary for Mac OS X Yosemite

Compiled from this source code using these very helpful intructrions

To download the binary using curl run

curl  -o x13ashtml -k https://gist.githubusercontent.com/gka/3b200d57b0db14d058f3/raw/364844106fb8edc0f1fc194c60dc2998aa9723d4/x13ashtml 
chmod +x x13ashtml