... to my blog style space for easier contribution by third parties and to provide what I believe to be an easier reading experience. Please field all enquiries and issues to the source repository.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"grinning": "\ud83d\ude00", | |
"smiley": "\ud83d\ude03", | |
"smile": "\ud83d\ude04", | |
"grin": "\ud83d\ude01", | |
"laughing": "\ud83d\ude06", | |
"satisfied": "\ud83d\ude06", | |
"face_holding_back_tears": "\ud83e\udd79", | |
"sweat_smile": "\ud83d\ude05", | |
"joy": "\ud83d\ude02", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkfs.vfat -n BOOT /dev/sda1 | |
mkfs.btrfs -L root /dev/sda2 | |
mount -t btrfs /dev/sda2 /mnt/ | |
btrfs subvolume create /mnt/nixos | |
umount /mnt/ | |
mount -t btrfs -o subvol=nixos /dev/sda2 /mnt/ | |
btrfs subvolume create /mnt/var | |
btrfs subvolume create /mnt/home | |
btrfs subvolume create /mnt/tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the\
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)