Posts / Code

Posts / Code

Photo by Bjørnar Hagen
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.
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.
How to run injected scripts with strict Content Security Policy (CSP) headers enabled, without compromising on security.
How to setup development and production container images for Next.js 13 with app router and standalone mode.
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.
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.