Skip to content

Instantly share code, notes, and snippets.

@simonnordberg
simonnordberg / README.md
Created May 10, 2019 13:18 — forked from loa/README.md
Dual GPG Yubikey Setup

Dual GPG Yubikey Setup

How to setup a new OpenPGP identity on dual Yubikeys for encryption, signing and ssh authentication.

  • Signature key never leave original offline yubikey (thus only 1 copy)
  • 1 offline Yubikey for signature key (recommended key yubikey 5c)
  • 1 online Yubikey for daily work (recommended key yubikey 5c nano)

Prerequisits

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@simonnordberg
simonnordberg / mongo-backup
Last active February 27, 2016 15:39
Backup a mongodb database and send the resulting backup archive (tar.gz) to an S3 bucket
#!/bin/bash
#
# Backup a mongodb database and send the resulting backup archive (tar.gz) to an S3 bucket.
#
# Prerequisites:
# mongodump
# s3cmd
#
# Use in crontab, e.g. for nightly backups (at 02:25):
# 25 2 * * * /usr/local/bin/mongo-backup -c /usr/local/etc/mongo-backup.conf >> /var/log/mongo-backup.log 2>&1
@simonnordberg
simonnordberg / sign.sh
Last active August 29, 2015 14:27
A tiny bash script that will re-sign iOS archives (ipa)
#!/bin/bash
if [ $# -ne 4 ]; then
echo "usage: $0 <ipa-file> <provisioning-file> <certificate-name> <entitlements-file>" >&2
echo "Valid certificates" >&2
/usr/bin/security find-identity -v -p codesigning
exit 1
fi
IPA="$1"