Blood Pressure 5 Day Record Form

I’ve written a 5 day blood pressure record form for my father. The one that was provided by the doctor wasn’t very intuitive.

You can access it on Google Docs here :


Freetrade Dividend Overview Spreadsheet

If you have a Freetrade account and want to keep track of your dividends in a simple table / graph, then I have written a Google Spreadsheet to help.

Step Instruction
1 Got to the Activity Tab on the Freetrade app
2 Click the Share icon in the top right corner
3 Select all activity
4 Select Gmail, or similar, to email it to yourself
5 Clear everything in the Full Export tab
6 Open your export in Google Sheets, copy all data
7 Paste the data from the export at the first cell the Full Export tab
8 View your dividend overview on the Dividends tab

Automated overview of dividend payments
Automated overview of dividend payments
Graph of dividends per month, per year
Graph of dividends per month, per year


I had a camera “front”.
I renamed it in the config to “front1” and added another camera called “front2”.
Once I was happy with my new higher resolution camera, I removed the old one and went back to just one camera in the config called “front”. I think that this caused all my recordings to disappear from disk.

However, the Frigate database seemed to think that they were still there. Deleting them all manually is somewhat tedious (especially because I had 29k of them!). So, I decided to delete them from the sqlite database with a command.

First I installed a sqlite client:

sudo apt install sqlite3

Then I worked out the date timestamp value that I needed by visiting Epoch Converter and picking the date time that I know I made a mess.

Yr Mon Day Hr Min Sec
2023- 6- 29 21 : 0 : 0 GMT
Human date to Timestamp
Epoch timestamp: 1688072400
Timestamp in milliseconds: 1688072400000
Date and time (GMT): Thursday, 29 June 2023 21:00:00
Date and time (your time zone): Thursday, 29 June 2023 22:00:00 GMT+01:00

I then copied the Timestamp in milliseconds into my delete command

$ sudo sqlite3 frigate.db
SQLite version 3.34.1 2021-01-20 14:10:07
Enter “.help” for usage hints.
sqlite> delete from event where start_time <= 1688072400; sqlite> .q

It took a few seconds, but dropped my events from 29k to 71.


nginx case insensitive URL

There was a requirement for a website on the server to have a case-insensitive.

There is no simple option in nginx to make it case-insensitive, there are also no nested if statements available.

This isn’t easy to achieve, but the below seems to have done it me (for only 1 URI!)

location ~* ^/TNG/$ {
return 301;

location ~* ^/TNG$ {
return 301;

set $BOTH "";

# Does the case-insensitive pattern match?
if ( $request_uri ~* ^/TNG/index.php$ )
set $BOTH "${BOTH}1";

# Is it not an exact match to the correct case?
if ( $request_uri != /TNG/index.php )
set $BOTH "${BOTH}2";

# If both true, then redirect to the correct case
if ( $BOTH = 12 )
return 301;

Decrypt TP-Link config.bin backup file

Copy your config.bin file to linux then run this command to create a decrypted config.txt :

openssl enc -d -des-ecb -nopad -K 478DA50BF9E3D2CF -in config.bin > config.txt


Choosing your own hosting and server type

In the past, I have paid £1000+vat a year for hosting to feed by hosting addiction.  This has whittled down in price over the years and now I’m paying just £42 inc vat!

Choosing the host type

  • Virtual Private Server (VPS)
  • Dedicated Server
  • Cloud VPS
  • Run on your home kit from your home broadband connection

Budget Hosting

Some good value providers in the UK are and   I’ve been with both of them and had a few annoyances (switching my server off | Selling me hosting that was supposed to be maintained, but wasn’t | Me asking them to reboot the host and them saying that it wasn’t where is was supposed to be.  Me asking again… them saying it’s still not there and closing the call) over the years, but in all-in-all they’re worth the money.

However, this has become an absolute no-brainer very recently…  My new provider charge just £3.50 a month for SSD based VPS (mine feels super fast!)

Premium Hosting

I have used a reseller account in the past and this had all sorts of features like a system for your users to manage their own accounts and resell too.  It all seemed a bit messy to me and eventually I’ve gone for managing it all myself with a few custom written scripts that do things perfectly.

I’ll expand this section as and when.