aottr

Hi, I'm Alex! :coffee:

I'm a software and devops engineer, living in France. Expect some posts about software engineering, devops and other tech-related topics. I'm using NixOS btw.
Subscribe to my RSS feed or follow me on mastodon to get the latest updates!

Recent Posts

Imagine you’re organizing an event and open the registration. 100 users want to get a room at the same time. You have 30 rooms…What could go wrong? … a lot ^^ The Problem As an urgent request from a local convention, I was asked to write a hotel booking system with a few constraints: Limited number of rooms (~500 in total) Different room tiers (with a quota per tier) User picks a tier and gets assigned a room Allocation should feel fair (FCFS, not a lottery) The system should respond quickly At first glance, this might sound simple.

After many years of using zsh with powerlevel10k, switching to fish and then falling back to the default terminal, I’ve decided to try something new and more up-to-date… I’ve been using the default terminal for a long time now. It’s simple, it’s easy to use, and it’s what the system comes with. I’ve been wanting to try something new for a while now, but the lack of time kept me from doing so (as always).

Remember how I mentioned, that I never really got “warm” with Traefik? Well, I’m still not, but at some point in time I fell for my auto-renewal not working correctly and gave it another shot. What is Traefik and why do I use it Sounds familiar yet? Sorry… Traefik is a modern reverse proxy and load balancer that makes it easy to securely access your services via a domain name. It’s written in Go (like Caddy) and was designed to be relatively easy to configure for container applications.

Some of you might use Mastodon, have an account there or at least heard of it. One feature of a mastodon profile is the Profile metadata, which lets you add all kinds of text and links to your profile. One feature that some might not be aware of, at least I didn’t see it on a lot of profiles, is, that you can have these links to your other social media profiles and websites shown as verified.

I’m reading articles and news daily from many different sources. I used to only read them on my phone before sleeping but I also started browsing blogs on my laptop at some point. During my regular flights to the US, I also see myself reading articles in the plane on my tablet. This behavior accumulated quite the amount of different devices where I read articles and rss feeds. But what happens if you, let’s say browse different websites and blogs daily, you bookmark them.

Yesterday, I showed how I set up my home server with caddy to retrieve SSL certificates and serve my self-hosted services like paperless-ngx and Jellyfin on human-readable domain names with SSL encryption. Let’s say you’re somewhere outside with friends or generally not in your home network, and you want to access some of your services at home to scan a receipt for paperless or listen to your music library. Exposing those services to the internet is no option to me personally, even though the services I’m using have a built-in authentication, I simply prefer to keep the number of access-points to my local network small.

What is Caddy and why do I use it Caddy can be called a multipurpose webserver, coming with a large subset of modules and being ready for most applications out-of-the-box while keeping a simple configuration. Some might know Caddy for being capable to automatically request Let’s Encrypt certificates without the need of certbot etc. I used to be a huge fan of nginx. Not Nginx Proxy Manager, but pure nginx xD I love the performance, I’m still very dependent on the internal routing, and even though I’m fine with configuring nginx, it doesn’t feel very intuitive sometimes.

Have you ever heard about GPG (or GnuPG)? Yes? Gooood :3 No? Give it a quick search and check it out, it can be some nerd fun. Creating GPG keys is one easy story. Keeping them is a whole other! Since I’m one of these people who always forgets the simplest things and therefore has to look them up, I decided to write this quick article about how to move your GPG keys from one machine to another…or creating a backup of them in general.

Refactoring some old code can be refreshing. Seriously ! xD (at least for me). So it seemed very close to my mind to take a look at the card editor of FurrCard again after finishing the majority of features that I implemented. Why tho? Because I felt the code bloated with lots of property-drilling and tons of functionality at the same place. Don’t get me wrong, having a one-page-serves-all solution can be a good experience.

Since I don’t want to handle with emails and passwords on FurrCard, I solely rely on common oauth providers like Discord and GitHub for authentication. A popular solution for oauth authentication in nextjs is Auth.js (formerly next-auth) which supports (and somewhat encourages) persisting sessions in a database using the prisma-adapter. This works quite well with a minimal setup basically, just referencing the Discord-Provider and Prisma-Adapter. import prisma from "./lib/prisma"; import { PrismaAdapter } from "@auth/prisma-adapter"; import type { NextAuthConfig } from "next-auth"; import Discord from "next-auth/providers/discord"; import NextAuth from "next-auth"; .