Skip to content

Instantly share code, notes, and snippets.

View aliceklipper's full-sized avatar

Alice Klipper aliceklipper

View GitHub Profile
@aliceklipper
aliceklipper / encode-gif
Last active July 30, 2017 12:08
Encode GIFs using mpv's A-B loop and ffmpeg.
#!/usr/bin/zsh
start="$1"
end="$2"
input="$3"
outdir="/home/aliceklipper/Pictures/Screenshots/MpvGifs/"
basename="${input##*/}"
@aliceklipper
aliceklipper / booleans.js
Last active December 30, 2017 22:58
Typelevel stuff in Flow
// Basic typelevel boolean functions.
type If<A: boolean, Then, Else = empty> = $Call<typeof If_, A, Then, Else>;
declare function If_<Then, Else>(true, Then, Else): Then;
declare function If_<Then, Else>(false, Then, Else): Else;
type Not<A: boolean> = If<A, false, true>;
type And<A: boolean, B: boolean> = If<A, B, false>;
type Or<A: boolean, B: boolean> = If<A, true, B>;