Install the OpenSSL on Debian based systems
sudo apt-get install openssl| #~/.mutt/aliases | |
| alias nick Nicholas Levandoski <[email protected]> | |
| alias tim Timothy Pitt <[email protected]> | |
| alias steven Steven Jackson <[email protected]> | |
| alias kaleb Kaleb Hornsby <[email protected]> | |
| alias alug-admin nick, tim, steven | 
| # taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
| # generate server.xml with the following command: | |
| # openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes | |
| # run as follows: | |
| # python simple-https-server.py | |
| # then in your browser, visit: | |
| # https://localhost:4443 | |
| import BaseHTTPServer, SimpleHTTPServer | |
| import ssl | 
| /* | |
| * Sample file using the Linux kernel coding convention. | |
| * | |
| * https://www.kernel.org/doc/Documentation/CodingStyle | |
| * | |
| * General rules: | |
| * - Indents are tabs and must be 8 spaces wide. | |
| * - Each line must be at most 80 characters long. | |
| * - Use C-style comments. | |
| * - File names should be lower-case.c | 
| #!/bin/bash | |
| # This script | |
| # - creates a user (named below) | |
| # - sets up a union (aufs) filesystem on top of the users immutable home | |
| # - creates a cleanup script (/usr/local/bin/cleanup.sh) that empties the aufs | |
| # layer on login/logout/boot | |
| # - replaces the lightdm config | |
| # - replaces rc.local to run the script | |
| # | 
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
| #!/bin/bash | |
| # Save docker images | |
| ds() { | |
| docker images | \ | |
| cut -d ' ' -f 1 | \ | |
| tail -n +2 | \ | |
| xargs -t -n 1 -I {} -P 4 \ | |
| sh -c 'docker save {} | bzip2 > $(echo "{}" | sed "s/^.*\///").tar.bz2' | |
| } | 
| On void linux. | |
| Under `/etc/containers/` there is a file called `registries.conf`. It is complemented by `man 5 containers-registries.conf`. | |
| Change (for me lines 11-12) which say | |
| [registries.search] | |
| registries = [] | |
| #!/bin/bash | |
| set -x | |
| KERNEL=./arch/arm64/boot/Image.gz | |
| KERNEL_DTB=${KERNEL}-dtb | |
| DTB=./arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dtb | |
| INITRD=initramfs-postmarketos-qcom-sdm660 | |
| # Optional: |