Use at your own risk! As with any backup method, test out your backup by restoring from it before you trust it.
-
Install
qrcodeto generate the QR code:pip install qrcode -
Export the key, piping the output to
qr, and save this to a png file:
| #!/usr/bin/env python | |
| # encoding: utf-8 | |
| import sys | |
| import os | |
| import re | |
| import getpass | |
| import requests |
| #!/usr/bin/env bash | |
| set -o xtrace # Expand and echo commands | |
| set -o nounset # Error if attempt to use undefined variable | |
| set -o errexit # Abort script at first error |
| import time | |
| import multiprocessing as mp | |
| from Queue import Empty | |
| def timed_run(func, args=(), kwargs={}, timeout=10, default=None): | |
| def run_func(q): | |
| result = func(*args, **kwargs) | |
| q.put(result) |
| #!/bin/bash | |
| remove_exited_containers() { | |
| docker ps -a -q | xargs -n 1 -I {} docker rm {} | |
| } | |
| remove_untagged_images() { | |
| docker rmi $(docker images --filter dangling=true -q) | |
| } |
| #!/usr/bin/env python | |
| """base32 encoding based on http://www.crockford.com/wrmg/base32.html | |
| Encodes the positive integer on stdin. This tool is designed to parallel | |
| base64(1). | |
| Usage: base32 [-h | -D] | |
| -h print this help | |
| -D decode input instead | |
| """ |
| # Lorem ipsum text. Optional argument is the number of sentences to | |
| # produce. Each sentence will be separated by an empty line. | |
| # Requires `pip install fake-factory`. | |
| function lorem() { | |
| local repeat=$1 | |
| if [[ -n $repeat ]]; then | |
| repeat="-r $repeat" | |
| fi | |
| PYTHONIOENCODING=UTF-8 python -m faker text $repeat | |
| } |
| # Sublime Text launcher, which does special stuff if you pass no arguments. If a | |
| # ".sublime-project" file is found in the current dir, it opens that. Otherwise, | |
| # it opens ".". | |
| function subl() { | |
| local args=$@ | |
| if [[ $# -lt 1 ]]; then | |
| args="$(find . -maxdepth 1 -name '*.sublime-project' -print -quit)" | |
| fi | |
| if [[ -z "$args" ]]; then | |
| args="." |
This is a fork of the SliceTricks
page of the golang wiki, but with documentation for each of the "tricks." I believe
that documentation has been omitted because the names refer to the old
container/vector, but that package no longer exists in the standard library,
so you can't find it on godoc. I created this by referring to
this archive.org cache,
(TODO: find git commit).