Skip to content

Instantly share code, notes, and snippets.

@johnthepink
johnthepink / benchmark.rb
Last active November 28, 2018 18:58
Ruby String Matching Benchmark
require 'benchmark'
require 'securerandom'
words = []
# generate list of random "words"
10_000.times.map do
words << SecureRandom.hex
end
@johnthepink
johnthepink / gifs.sh
Created January 18, 2022 16:03
Creating Gifs on OSX
# dependencies to install
brew install ffmpeg
brew install gifsicle
# add this to your shell environment
function v2g() {
ffmpeg -i "$1" -pix_fmt rgb8 -r 10 "$2" && gifsicle -O3 "$2" -o "$2"
}
# record a screencast with Quick Player