Platform based dependencies in poetry


I have a small django project that I develop on both linux and mac. I deploy this project using the alpine version of the python docker image.

Originally, I had installed the psycopg2-binary package on my mac for local development, but once started to package up the app, I …

more ...

Docker Compose Log File Settings


The Problem

I recently connected to a remote machines and found a disk space warning.

In order to diagnose the cause of the disk space issue, I used a neat tool called ncdu (NCurses Disk Usage).

sudo ncdu /

Using the excellent interface, I was able to trace the issue to …

more ...

SSH Certificates with step-ca

DateTagsca / tls / ssh


Follow instructions on the previous post or the step readme


Create required root and SSH signing keys:

$ step ca init --ssh
✔ What would you like to name your new PKI? (e.g. Smallstep): Whatsdoom
✔ What DNS names or IP addresses would you like to add to your new …
more ...

Creating Airgapped keys for Yubikey


Before you begin, it would probably be a good idea to have three flash drives and a Yubikey.

  1. Your first USB stick will be a Live USB that will boot the airgapped system.
  2. The second will store the packages that you will need to install on the newly booted …
more ...

Restricting rsync access with SSH

DateTagsssh / rsync

SSH public keys can be added to ~/.ssh/authorized_keys on a typical system to allow the holder of the private key to access the system. Sometimes however you might want to restrict the access a particular key has.

In my case, I wanted my CI system to be able to …

more ...

Getting better feedback from sinon stubs

Sinon is an extremely powerful tools for writting unit tests. It helps to create standalone spies, stubs and mocks to isolate functionallity.

Setting up Sinon

The documentation suggests you can, for example, create a spy like so:

it('calls the original function', function () {
    var callback = sinon.spy();
    var proxy = once …
more ...

Extending Supertest

I have an express app running behind an Apache reverse proxy with mod_auth_mellon used to authenticate users via SAML.

As a result of relying on headers for auth, I have lots of mocha tests that look like:

it("should add a comment with a user", (done) => {
    let expectedUser = "a User …
more ...