Skip to content

Instantly share code, notes, and snippets.

@rubeniskov
Last active October 12, 2020 02:21
Show Gist options
  • Save rubeniskov/6d56a63d80604f6f9706aef1d417e1b4 to your computer and use it in GitHub Desktop.
Save rubeniskov/6d56a63d80604f6f9706aef1d417e1b4 to your computer and use it in GitHub Desktop.
Save the terminal session to gif
#!/usr/bin/env bash
if [ -z "$1" ]; then
echo -ne >&2 "Name of capture file required $0 <file>\n"
exit 1
fi
asciinema rec $1.json
docker run --rm -v $PWD:/data asciinema/asciicast2gif -s 2 -t solarized-dark $1.json $1.gif
open $1.gif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment