Skip to content

Instantly share code, notes, and snippets.

@gpanders
gpanders / pomodoro.sh
Last active June 16, 2020 21:43
Command line Pomodoro timer
#!/bin/sh
usage() {
echo "Usage: $(basename "$0") [focus time] [short break] [long break]"
}
if [ "$1" = "-h" ]; then
usage
exit 0
fi
@gpanders
gpanders / pwck
Last active March 2, 2020 03:11
Shell script to check passwords against HIBP database (https://haveibeenpwned.com/)
#!/bin/sh
usage() {
echo "Usage: $(basename "$0") [-q] [PASSWORD]"
}
while getopts "hq" o; do
case "$o" in
h) usage; exit 0 ;;
q) quiet=1 ;;

Keybase proof

I hereby claim:

  • I am gpanders on github.
  • I am gpanders (https://keybase.io/gpanders) on keybase.
  • I have a public key ASAemgSY6kbqMXArUobECgRTfQFrTloZBBtDN5DrIzxepQo

To claim this, I am signing this object:

@gpanders
gpanders / query.sh
Last active November 13, 2019 20:23
Query lbdb and cache results into a mutt aliases file
#!/bin/bash
# Query lbdbq and save results to Mutt alias file
set -e
# Mutt aliases file to save results to
ALIASES="$HOME/.cache/mutt/aliases"
# Only save email addresses from $DOMAIN. Leave empty to save all email addresses
DOMAIN="example.com"
@gpanders
gpanders / after_ftplugin_markdown.vim
Last active August 30, 2024 10:23
Un-wrap Markdown links after processing with pandoc
setlocal formatprg=pandoc\ -f\ markdown\ -t\ markdown
setlocal formatexpr=ft#markdown#format()
@gpanders
gpanders / docker-backup.sh
Last active November 20, 2023 13:16
Backup and restore Docker volumes to/from a compressed tar file
#!/bin/bash
set -e
usage() {
echo "Usage: $(basename "$0") [-v] volume_name backup_dir"
}
v=""
while getopts "hv" o; do