Blog posts
Install AdGuard Home on an OPNsense router
📆2022-02-13🍱server
I recently decided to upgrade my old Asus router to something more modern and fun. Since going the self-hosted and open-source path recently, the choice was easy. A small, dedicated hardware running OPNsense. One of the most important…
How to set a static IP on Ubuntu Server 20.04
📆2021-12-30🍱server
Previous versions of Ubuntu Server used a file under /etc/network to configure static IP addresses, but this has been changed in later versions of Ubuntu. When installing Ubuntu Server, a tool called NetPlan will probably configure your…
How to use domain names for servers in a home environment
📆2021-08-04🍱server
Naming stuff is difficult, especially in the digital world. It's one of the things that you want to get right the first time. So it is scalable and descriptive without having to redo it after a year when you buy a new NAS or move to another…
Install AdGuard Home with Docker on a Raspberry Pi 4
📆2021-06-13🍱server
The Raspberry Pi is a great little computer you can use for many different things. Unless you need a lot of processing power it’s good enough to run as a small home server. I’ve decided to use mine for some network related stuff since the…
Log in with ssh key authorization on a Synology NAS
📆2021-03-31🍱server
The operating system of a Synology NAS, DiskStation Manager , is a great web-based GUI making it easy for everyone to manage their NAS. However, sometimes it's preferable to access the NAS through SSH instead of the GUI. Logging in with…
Sign git commits on GitHub with GPG in macOS
📆2021-01-18🍱tools
When you are pushing commits to your repositories you are authenticating with either HTTPS or SSH. Telling GitHub that it is really you. That only ensures that it's the correct user doing the pushing. You could also add an extra level of…
Enable Keyboard Setup Assistant if Change keyboard type is hidden
📆2021-01-10🍱tools
When plugging in a new keyboard to the Mac you need to set what kind of layout it has if not detected automatically. The Keyboard Setup Assistant usually pops up the first time you plug the keyboard in and you can choose if it's ISO or…
Concatenate multiple optional items with separators
📆2020-09-22🍱code
Concatenating strings is a pretty straight forward task in JavaScript and with the introduction of template literals with string interpolation things got even simpler. Let's say that we want to concat a couple of inputs of a form that is…
Access private submodules in GitHub Actions
📆2020-07-09🍱tools
Using submodules can be a simple solution to make some parts of a public repo private. For example I have separated the actual content of this blog to a private repo. Not because it's something secret (you are reading it now anyway) but it…
Upgrade all dependency versions in package.json with yarn
📆2020-06-23🍱tools
Updating dependencies in an npm project is pretty straight forward and easy to do with the command yarn upgrade . It updates all packages to their latest backwards-compatible version. Something that those coming from using npm update…
Automate versioning and publication of npm packages
📆2020-06-06🍱tools
A while ago I wrote a post about always writing perfect commit messages by using commit linting tools and conventional templates. This makes the commit messages look great and formatted the same way regardless of who is committing but…
Manage plugins natively in vim
📆2020-03-04🍱tools
There are many useful plugins for vim and I've always used a plugin manager to handle them all. Recently I found out that vim has had support for package management out of the box a long time now. It was actually really simple to switch…
Update state with useReducer synchronously
📆2020-01-24🍱code
Hooks in Reacts are wonderful to work with and managing local state is one of the most common ones. For more complex states the useState() hook could be changed to a useReducer() instead. A problem we might encounter is that state isn't…
Partial types in TypeScript
📆2019-11-21🍱code
TypeScript is great for many reasons and when getting past the first few steps it really makes developing a joy. With that said there may come a time when objects keep growing in size and maybe not all properties will exist all the time…
Difference between dependencies, devDependencies and peerDependencies in npm
📆2019-09-30🍱tools
When creating a new npm project, all those with a package.json in the root directory, we usually don't create everything from scratch but need some dependencies. There are different type of dependencies that can be somewhat difficult to…
Quiet Keyboard Build - KBD67 with Zilents v2
📆2019-08-16🍱personal
Time for another build. For this one I wanted it quiet and small but still with nice, tactile switches. My current board had Zealios v2 67g but they were slightly too heavy and way too loud to be my daily driver. The tactility was great…
Conditions in CSS with the :not pseudo class
📆2019-08-05🍱code
When writing CSS we sometimes want some more logic to our styling. For example a navigation with multiple elements in a horizontal layout probably needs some space between the elements. A padding-right could do it but we don't want…
Put GraphQL fragments in their own files in Gatsby
📆2019-07-15🍱code
Gatsby uses GraphQL under the hood for managing data and it does this really well. It usually doesn't take long before the queries grow big and some duplicated code will occur. This is where fragments come in handy. A way to break out…
Update nvm installed node version and keep globally installed packages
📆2019-07-01🍱tools
Node Version Manager is great for managing and working with different node versions but can be a little tricky to update to a newer version the first times. Especially if you want to keep all the globally installed packages. It’s actually…
Update Drone CI to latest version
📆2019-06-14🍱server
Drone is a great open source CI/CD running in a docker container that is both easy to use and install. Because it runs in a container and doesn’t require a lot of dependencies installed on your system it’s really easy to update to a new…
Different git config for different projects or clients
📆2019-05-20🍱tools
If only working on projects with one single git service you won’t have a problem with email addresses differ between accounts. All your commits will always use the same information. But say you are using one service for private projects…
Always write perfect commit messages with Git Commitizen and Husky
📆2019-05-13🍱tools
We’ve all been there, looking at a function and don’t understand a thing of what it does. The next step is of course look at the commit message, the git blame. That will explain everything for us. Or will it? We open it up and we see this…
Make a TypeScript Node server hot reload on changes with Nodemon
📆2019-04-10🍱tools
When building a front-end app today it is common to have the app hot reloading in the browser every time you make a change. This can also be done for your back-end app built with Node by using a package called Nodemon. This app watches all…
How to install and configure Drone CI on a self-hosted server
📆2019-02-27🍱server
Drone CI is an open source continues integration and delivery platform built on container technlogoy. It is a lightweight and easy to use solution for testing and deploying your projects. Drone is distributed and run in a Docker container…
Keeping a forked repository up to date with the original repository
📆2019-01-26🍱tools
If you fork an existing git repository and add that fork to your own repositories it will not be in sync automatically with the original repo. That could of course be a good thing if you want to develop the project in your own direction…
Working with multiple git services simultaneously
📆2019-01-20🍱tools
If you have your git repositories spread across multiple git services, like GitHub for work and GitLab for personal, you can run into problems with your git credentials. Especially if you are using different email addresses, such as the…
Keyboard build - va69m with Zealios switches
📆2018-12-18🍱personal
I've always loved Varmilos keyboards and their amazing build quality. Unfortunately the firmware is often really bad and leave a lot to wish for, especially the lack of programmability. As with most mass produced keyboards the selection of…
Add HTTP/2 and HSTS to your Nginx site
📆2018-11-27🍱server
HTTP/2 has only been out a for a few years but it is certainly time to activate it on your sites now. Compared to the old HTTP 1.1 there are many pros. Requests are downloaded parallel instead of in a queue, greatly improving speed and…
Add HTTPS to Nginx blocks with Let's Encrypt
📆2018-11-19🍱server
Browsing the web unencrypted with only HTTP is not recommended anymore and Google recently started to mark all sites without SSL as “not secure” in their browser Chrome. Adding a certificate to your site used to cost money and often meant a…
How to install Nginx and add server blocks
📆2018-11-11🍱server
If you’ve been working with web servers for a while you’ve probably heard about Apache. It was pretty much the default solution when setting up a new site on a self hosted server a while back. The classic LAMP stack , an acronym for Linux…
Generate and organize SSH keys on Mac
📆2018-11-08🍱tools
If you've never heard about SSH keys and are still using passwords when logging in to your remote servers you're in for a treat. Or maybe you already know about SSH keys but aren't organizing them in a good way. Anyway this post will make…