Geeklab.io

Freelance 👨🏻‍💻 software developer. Addicted to 🏍️ motorcycles and 🏞️ travel.

Fighting COVID-19 at home

COVID-19, a global pandemic. Stuck at home in quarantine. Can't go outside. Can't see family or friends. Stuck working remote, netflixing or playing games. Feeling useless. What can you do? You can boinc-client on all your PC's, laptops, NAS and servers! If you join the Rosetta project, you'll help research COVID-19 and possibly find a cure. I'm running boinc in combination with boinctui (a terminal boinc manager) on multiple machines, and even on my Synology NAS through Docker! Set it up t...
Read post

Webstorm plugins

I've been using IntelliJ products for over 10 years now, and I've been a massive fan of loads of different plugins. The past two years I've moved primarily to Front-End engineering and I've adopted Webstorm as my current go-to editor. Here's a list of the plugins I'm currently using: 1. Material Theme UI Plugin homepage 2. CodeGlance Plugin homepage 3. Rainbow brackets Plugin homepage 4. Indent Rainbow Plugin homepage 5. .env files support Plugin homepage 6. Styled Componen...
Read post

PSA: Mind your .NET loglevel

A wild issue appears At my current client, we have been chasing a frustrating issue between our NodeJS frontend and a specific .NET service. Adding distributed tracing from front- to back-end services didn't give us any clues. We sprinkled logging everywhere, but this also didn't give us any clues. Frustrated and burnt-out developers roamed the office, crying tears of failure. Pinpointing a possible source Going through the massive amount of logging, we finally ended up pinpointing the issue ...
Read post

Cheap UPS to protect your NAS

Secure. That. Media! I bought a new Synology DS1019+ last year and have 3x 8Tb disks filled with thousands of photos and video's. Also, I recently became a dad (🎆!) and the storage of my photos has become much, much more important. I'd like to have all digital media of my child, plus any media they might be interested in (pictures of young mom & dad boozing it up) securely stored for later consumption. A NAS, however, is not a backup (obviously). So I'm already running nightly incremental ...
Read post

NodeJS HPE_HEADER_OVERFLOW

Quick knowledge tip We ran into an issue on production where our k8s ingress controller was returning 400 Bad Request on multiple responses a day. After debugging the cause was a header was being sent that was larger than 8Kb, which was rejected (dropped) by NodeJS. Nginx then returned a 400 since the request did not return a valid response. It was caused by two things: An Akamai rule duplicating header values, so we got multiple headers multiple times A frontender setting a ludicrous amou...
Read post

NextJS + Ingress subpath prefixing

Prefixing your NextJS app through Ingress What do we want to achieve? By default, NextJS doesn't support serving an application with it's assets from a custom app prefix (in both dev and prod), for example: https://www.myapp.com/ <-- SomeOtherApp https://www.myapp.com/portal <--- My NextJS app https://www.myapp.com/static/portal <--- My NextJS static (cached by CDN) NextJS configuration To be able to do this we need to add a custom server.(js|ts), use the setAssetPrefix and pass ...
Read post

Quick access to local offline reference docs

Introduction Premise Through a simple key-binding (shift+ctrl+d) I can quickly launch or focus reference documentation (using devdocs). Steps So, how are we going to do this? We're going to install some software to facilitate the mechanics: wmctrl, nativefier and devdocs We're going to write a bash script that launches or focuses the devdocs We're going to bind the bash script to a key-binding (nb: This guide was tested on Ubuntu 18.04) Installing software 🛃 Installing wmctrl (1 of 3...
Read post