Max Rosin

Most software projects use other projects/libraries as dependencies. And if we describe infrastructure as code we also depend on other things, e.g. specific versions of Terraform modules or Docker images. The best practice is to always specify dependencies as precise as possible to make the outcome of the build or deployment reproducible. When a codebase has many dependencies it can become a tedious task to keep track of all new releases of all dependencies and to keep the dependency definitions up to date (and tested). Wouldn't it be nice to automate this? Dependabot 🤖 Users of GitHub probably know Dependabot. It is a bot that monitors GitHub repositories and creates pull requests if it…

Max Rosin

I use a private instance of GitLab a lot and utilize the GitLab CI for most of my private projects. To speed up the CI jobs I wanted to have more GitLab runners available on demand. From our GitLab instance at work I already knew that GitLab supports autoscaling runners with docker-machine . At work we use this in combination with our OpenStack cloud, but for my personal use I was looking for a way to deploy GitLab runners at Hetzner Cloud . Searching the internet for a while led me to this (German) blog post which sounded like a good approach. So I went ahead and started to implement it in a very similar way. Long story short... I am extremly happy with the result! I can get an…

Max Rosin

Cypress is an open source testing framework that is described by its maintainers as "Fast, easy and reliable testing for anything that runs in a browser." I started to use it in the CI/CD pipeline of this blog to ensure that the website still works after I made changes. After a few days it has already proven itself to be powerful and easy to use. The only issue I had so far came up when I tried to run my tests against a development site behind basic auth . The primary issue is that the returned URL of cy.url() does not contain the basic auth credentials that are defined in the baseUrl configuration. It took me a moment to figure out why and searching the internet wasn't too helpful so…

Max Rosin

When I migrated my blog to Gatsby it took me a while to find a theme that looked good and satisfied my requirements. In the end I was not able to find an existing Gatsby theme, so I settled on the Future Imperfect theme of HTML5 UP and transformed their template into a Gatsby theme. Implementing the React part of the theme from scratch meant that I needed to integrate all logic like pagination, a RSS feed , etc. from scratch as well. One thing I was missing so far was a proper integration for the Open Graph protocol . The Open Graph protocol is used by other services (e.g. Google, Facebook, Twitter, Telegram) to determine how to display link previews when someone posts a link to…

Max Rosin

When working with Git I sometimes end up with a lot of untracked local files that I want to get rid of. For example, compiling things and testing around can create more stuff than expected or a git reset origin/master rolling back a lot of commits can leave a bunch of leftovers. To me this happens a few times a year and each time I realize that I forgot how I solved it last time. The answer is: git clean . git clean -n Dry-run, show what would be deleted git clean -f Really delete it git clean -d Recurse into untracked directories For me this usually means git clean -f -d and I am done. For more options check out the man page .