Anyone who has implemented a simple HTTP 1.1 server can tell you that it is a really simple protocol. Basically, it’s a text file that has some specific rules to make parsing it easier. All HTTP requests look something like this: 1 GET /path HTTP/1.1\r\n Host: aarol.dev\r\n Accept-Language: en,fi-FI\r\n Accept-Encoding: gzip, deflate\r\n \r\n The...
Making changes to websites is tricky, because even small changes may lead to visual regressions in the page layout. For example, changing a bit of CSS to fix something somewhere may blow up in a completely different place. I could just click around and make sure everything looks okay, but that is boring and error-prone. What if I told you that...
Recently, the cushions of my old headset, the HyperX Cloud Stinger, were breaking apart pretty bad. I had been using them for 5+ years at that point, so it was time for an upgrade. I bought a new wireless gaming headset, the SteelSeries Arctis Nova 7. So far, it has been great. I was expecting to feel a noticeable delay in the audio since they...
Advent of Code is an annual set of Christmas-themed computer programming challenges that follow an Advent calendar. It has been running since 2015. The programming puzzles cover a variety of skill sets and skill levels and can be solved using any programming language. Participants also compete based on speed on both global and private...
Dev Drive is a new type of storage volume in Windows 11 that is specially made for programming workloads. Instead of the typical NTFS filesystem, it uses ReFS (Resilient File System), which is a newer filesystem based on Copy-on-Write (COW) linking. Basically, if you have two copies of a file, only one copy actually exists on the disk. The other...
Have you ever shared a link somewhere and wondered where those little preview images of websites come from? Well if you didn’t know, they are called OpenGraph tags. Open Graph protocol was invented by Facebook and is now used by many other social media sites, like X (Twitter), LinkedIn, Reddit, Discord, Mastodon and many others. They look like...
Valmistuin ylioppilaaksi keväällä 2023. Kirjoitin viisi eri ainetta, joista sain seuraavat arvosanat: Aine Pistemäärä / Max Arvosana L:n pisteraja Äidinkieli 80 / 120 E 89 Pitkä englanti 271 / 299 L 267 Pitkä matematiikka 105 / 120 L 81 Fysiikka 84 / 120 L 81 Kemia 111 / 120 L 99 Olin...
After Lastpass suffered a massive data breach last year, I began looking for an alternative password manager. Bitwarden is another centralized password manager like LastPass, but with the added benefit of being completely open source! They also allow you to spin up your own Bitwarden server and connect to them with all of their clients. Fly.io...
Compared to Javascript, Python and other single threaded languages, Go takes a very different approach to I was having difficulties understanding how concurrent Go programs are supposed to work. Coming from single-threaded event-driven languages like Dart and Javascript, it was not easy wrapping my head around things like mutexes or channels. I...
TLDR: # http.ListenAndServe(":8080", nil) // bad http.ListenAndServe("localhost:8080", nil) // good If you are using Go with Windows, you might encounter a small annoyance when running a http server. When using go run to run the server, Windows Defender will sometimes prompt you for firewall access. Here is an example of a Gin server doing...
Shortcuts # Ctrl + Shift + K : Delete current line Alt + Down/Up : Move selected line(s) up/down Alt + Shift + Down/Up : Duplicate selected line(s) up/down Ctrl + D : Select next occurrence of selection (shown below) Ctrl + K + Ctrl + D : Unselect the last occurrence and select the next one (used in combination with Ctrl + D )...
ATTENTION: there are now several forks of SD that offer web GUI’s and can install on Windows in one click (most notably sd-webgui). If you want to run Stable Diffusion programmatically and don’t mind some extra steps, read on. Prerequisites # In order to run Stable Diffusion locally on Windows, you will need a Nvidia GPU with at least 8 GB of...
Fly.io is a cloud service that can be used to easily deploy fullstack applications on the web. You only pay for what you use, and servers can be scaled up and down easily. Fly.io supports lots of frameworks and Docker images, which will come in handy. I’ll show how you can deploy a Caddy web server serving a single page application with a Go...
X11 doesn’t support monitors with variable refresh rates: When using one 60hz monitor and one 144hz monitor, the shell (Gnome, KDE etc) will run at 60hz on both monitors. Wayland might fix this, but: Wayland is not enabled on Nvidia GPUs by default. Even if it is possible to use Wayland with the proprietary drivers, it’s not stable enough to be...
While reading the code of flutter apps, I’ve seen this particular piece of code repeated way too many times: return MaterialApp( theme: ThemeData.dark().copyWith( textTheme: ... ), home: ... ) This is problematic for a couple reasons that become clear when we take a peek at how ThemeData works. This is taken directly from the material...
There are a lot of units to remember in physics. I often make errors because I forget to multiply by something, or I’m mixing up meters and kilometers by mistake. Wouldn’t it be convenient to not have to worry about that and make the computer to it instead? I recently found out that SpeedCrunch, which is a fast & minimal open-source scientific...
The app I’m currently building has a feature which displays a custom wallpaper on the home screen. It involves the user choosing an image from their gallery and cropping it to their device’s aspect ratio. The app then modifies the image and sets it as the background. There’s just problem: How do I get the pixel dimensions of the screen? Screen...
This is the first post on my website. I made this website to host anything that I want to publish. My number one goal is to write about things that atleast one person somewhere might find useful. Solutions to problems that I have encountered, guides on languages/frameworks or just something cool I want to share. Static site generation # Static...
👋 Hi, I’m Aaro # I’m a 20-year-old living in Finland, currently studying computer science at Aalto University. 🦀 Favorite programming languages # Go Rust Typescript C++ 🎮 Favorite games # Team Fortress 2 Monster Hunter: World Warframe Terraria 🖥️ Setup # AMD Ryzen 3600x with 16 GB RAM, RTX 3060 Ti Visual Studio Code Obsidian.md 📮...