SIGNAL OK::~/postsSANDEFJORD, NO · 59.13°N::00:00:00 UTC::NODE-04
HB
HB
~ /posts

Posts.

Notes, experiments and mistakes documented in real-time. Some of these are useful. Most of them are at least specific.

8 entries · 5 years · last update 2025·09·05 // sorted newest
No. 0008 · featured · most recent · 2025·09·05
Drizzle Migrations with a Safety Net
No. 0008 · LATEST
2025·09·05
// featured · latest entry
Drizzle Migrations with a Safety Net
2025·09·05 · 2025

Ever ran a database migration only for it to fail halfway through, and then you're stuck with a partially migrated database? Then you try to run a rollback, which fails because the database is not on the previous version, nor is it on the next version, it's somewhere in between, so you have to cleanup manually. I've had this problem way too many times, so I finally got bothered by it enough to create a solution for myself.

archive · 7 entries · newest first
You are using Docker wrong
No. 0007
2024·02·10

You are using Docker wrong

I see many developers using Docker wrong. They still run everything locally, and only use Docker in the CI/CD pipeline. While this has it's benefits, there's still a lot of potential being missed.

Auto versioning your app with a simple bash script
No. 0006
2024·01·05

Auto versioning your app with a simple bash script

To automatically version your app can be pretty complicated and a lot of solutions require complex dependencies and configurations. In this post I will show you how to do it with just a simple Bash script and Git.

Laravel CSP and BrowserSync
No. 0005
2023·08·05

Laravel CSP and BrowserSync

In this post, I'll show you how to set up Content Security Policy (CSP) and BrowserSync in a Laravel project.

Good money.
No. 0004
2022·03·15

Good money.

I don't believe we shall ever have a good money again before we take the thing out of the hands of government - F. A. Hayek

Are cookies really the most important thing for your business?
No. 0003
2021·07·08

Are cookies really the most important thing for your business?

The number one priority for so many businesses these days seem to be to get your oh so precious consent in order track you with cookies, and don't you dare do anything on their website before you've given it!

How to add line numbers to pre tags
No. 0002
2021·05·06

How to add line numbers to pre tags

Reading code is easier when you have line numbers, but how can you show line numbers in a <pre> tag? This can easily be solved with a few lines of JS and CSS, no need for a big external library.

UX tip for external links
No. 0001
2021·04·28

UX tip for external links

Clicking links going to an external site can be annoying if you aren't prepared for that. To improve the user experience you should show some kind of indicator for external links.