Skip to content

Instantly share code, notes, and snippets.


Raine Revere raineorshine

View GitHub Profile
raineorshine /
Last active Mar 22, 2020 — forked from kopischke/
Automatically add completion functions for aliases
# Usage:
# 1. Save to /usr/local/etc/ or wherever.
# 2. echo "source /usr/local/etc/" >> ~/.bash_profile
# 3. source ~/.bash_profile
# Automatically add completion for all aliases to commands having completion functions
function alias_completion {
local namespace="alias_completion"
raineorshine /
Last active Feb 27, 2019 — forked from chrisroos/
Instructions for exporting/importing (backup/restore) GPG keys

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/
# or, instead of backing up trustdb...
gpg --export-ownertrust > raine-ownertrust-gpg.txt

NOTE The GPG manual suggests exporting the ownertrust instead of backing up the trustdb, although it doesn't explain why.

You can’t perform that action at this time.