Flask migration of non-nullable fields

It is quite easy to add a non-nullable field to an empty table. Any migration tool, including Alembic, can automatically generate a migration file for you that is immediately ready for use, with no modifications required. The problem arises when you have a table that is populated with data. You specify that you want a new field that doesn’t accept null values, yet, you already have a host of rows on the table created prior to this new addition....

October 12, 2019 · 3 min · Me

The expert beginner { good || bad }

This has been you at a specific point in your life. The Expert Beginner is one who has new skills to learn in their craft and improvements to make in their professional life, and is intentional about how they grow. A high number of Expert Beginners are found in the Tech industry because it is receptive to career transitions and tech employees are asked to be dynamic. Some people in tech have a tech related certification from university, others can rightfully brag to be self-taught while others were in a completely different industry - like I was before I became a Software Engineer....

August 9, 2019 · 2 min · Me

Seting up NGINX

Written in 2019 This is a process that I find myself doing over and over again, and for the most part I keep skipping a couple of steps or repeating them. Hopefully having it here will make my work easier the next time I need to set up NGINX. Setup NGINX Setup UFW (Uncomplicated Firewall) rules sudo ufw allow out 22/tcp sudo ufw allow out 80/tcp sudo ufw allow out 443/tcp Lets start by updating our software...

May 25, 2019 · 3 min · Me

Disabling Ubuntu MOTD spam

When you log into an Ubuntu machine using SSH or a console, you’ll see a motd (“message of the day”) printed with some useful system information, as well as some useless marketing spam. The useless marketing spam is the same material you see when you visit motd.ubuntu.com. This is an affront to good taste, and should be disabled. There are a few ways to disable the MOTD altogether. You can touch the file ~/....

February 25, 2019 · 1 min · Me

Broken image handling with jQuery

Missing images will either just display nothing, or display a [ ? ] style box when their source cannot be found. Instead, you may want to replace that with a “missing image” graphic that you are sure exists so there is better visual feedback that something is wrong. Or, you might want to hide it entirely. This is possible because images that a browser can’t find fire off an “error” JavaScript event we can watch for....

February 3, 2019 · 1 min · Me