Subscribe
Fenix

Technologies, Hacks and Games...

Latest posts

AWS

Nightly MySQL and content backups to S3 with a systemd timer

My old Ghost server ran for years with no backups at all. On the new one, a small bash script dumps MySQL, tars the content folder and uploads both to S3 every night, driven by a systemd timer. Here is the script, the units, the bucket and the gotchas I hit.

6 min read
AWS

Deriving an SES SMTP password from an IAM access key in Python

The SES SMTP password is not your IAM secret key. It is a short HMAC chain over the secret, the region and a fixed message. Here is the Python for it and the script I use to rotate the key and write it to my Ghost host without printing it.

5 min read

Cleaning up orphaned GTT orders in Zerodha using Python

A Zerodha GTT does not know its stock was sold, and if it fires later it sells short in delivery. Here is the Python script I use to find orphaned GTTs, delete them after a dry run, and trail the stop on the ones that are left.

6 min read