Skip to content

Instantly share code, notes, and snippets.

Avatar

Gregory Anders gpanders

View GitHub Profile
@gpanders
gpanders / pomodoro.sh
Last active Jun 16, 2020
Command line Pomodoro timer
View pomodoro.sh
#!/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 Mar 2, 2020
Shell script to check passwords against HIBP database (https://haveibeenpwned.com/)
View pwck
#!/bin/sh
usage() {
echo "Usage: $(basename "$0") [-q] [PASSWORD]"
}
while getopts "hq" o; do
case "$o" in
h) usage; exit 0 ;;
q) quiet=1 ;;
View keybase.md

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 Nov 13, 2019
Query lbdb and cache results into a mutt aliases file
View query.sh
#!/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 Oct 23, 2019
Un-wrap Markdown links after processing with pandoc
View after_ftplugin_markdown.vim
setlocal formatprg=pandoc\ -f\ markdown\ -t\ markdown
setlocal formatexpr=ft#markdown#format()
@gpanders
gpanders / docker-backup.sh
Last active Oct 23, 2019
Backup and restore Docker volumes to/from a compressed tar file
View docker-backup.sh
#!/bin/bash
set -e
usage() {
echo "Usage: $(basename "$0") [-v] volume_name backup_dir"
}
v=""
while getopts "hv" o; do
You can’t perform that action at this time.