Skip to content

Instantly share code, notes, and snippets.

View projectivemotion's full-sized avatar
👽
let's work

Amado Martinez projectivemotion

👽
let's work
View GitHub Profile
@projectivemotion
projectivemotion / gpg2qrcodes.sh
Last active September 9, 2021 04:47 — forked from joostrijneveld/gpg2qrcodes.sh
Producing printable QR codes for persistent storage of GPG private keys
#!/bin/bash
#1. export gpg private key as ascii
#2. split ascii into 4 qr code images
#3. generate bash script for importing bash images
#4. generate bash script for decrypting files.
gpg --export-secret-key --armor | split -C 1000 - IMG
for f in IMG*; do cat $f | qrencode -o $f.png; rm -vf $f; done
#learnmysql_init will pull mysql and phpmyadmin/phpmyadmin images from the registry
function learnmysql_intit {
#Change supersecretpassword to work in not trusted network.
docker run --name mysql -e MYSQL_ROOT_PASSWORD="supersecretpassword" -d mysql
docker run --name phpmyadmin -d --link mysql:db -p 8080:80 phpmyadmin/phpmyadmin
}
function learnmysql_stop {
docker stop mysql phpmyadmin
}