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
# remove annoying mouse handling from vim | |
echo "set mouse -=a" > ~/.vimrc | |
# install packages | |
sudo apt install -y git hugo python3-acme python3-certbot python3-mock python3-openssl \ | |
python3-pkg-resources python3-pyparsing python3-zope.interface python3-certbot-nginx | |
# add user, follow instructions, generate strong password with pwgen 100 | |
adduser foobar |
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
-- PostgreSQL database migration to split up one table into two smaller ones and store the new ID with the original table | |
DO $$ | |
DECLARE | |
-- vars | |
insert_id int; | |
BEGIN | |
-- do something | |
FOR r IN |
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
# To create a new postgres database with a new user/password combination | |
# we first have to log in as the postgres user | |
sudo su - postgres; | |
# now we are the "postgres" user which is allowed to create new database users | |
# we use the -P parameter to create a new user called "annie". Annie uses a password. | |
createuser -P annie; | |
# finally, we create Annie's database | |
createdb -O annie annies_database; |