kasad.com blog

Tutorials, write-ups, and ramblings on various tech-related things.

See wiki.kasad.com (archived) for information/documentation about kasad.com and its services.

How a React mistake took down our whole backend

Recently, at Purdue Hackers’ weekly Hack Nights, we’ve been seeing an issue where every service on our server goes down simultaneously. And a simple restart doesn’t fix it; they keep going back down until the night is over. The scene We have some custom software powering Purdue Hackers' events and projects, like our webring, a Discord bot for our community server, and important to this story, a Hack Night dashboard complete with a digital doorbell to let us know when people have arrived and need to be let in to the building....

November 8, 2025 · 11 min · Kian Kasad

Full-system backups without root on Linux

When running a Linux system, you often want to create full-system backups. However, running processes as root is generally bad practice. This article looks at how to run a full-system backup as a non-root user. Capabilities primer Linux has a concept of capabilities, which are fine-grained privileges that can be granted to processes and executable files. The capabilities(7) man page has a good summary: For the purpose of performing permission checks, traditional UNIX implementations distinguish two categories of processes: privileged processes (whose effective user ID is 0, referred to as superuser or root), and unprivileged processes (whose effective UID is non‐zero)....

June 1, 2025 · 7 min · Kian Kasad

UNIX Process Groups

Note: This was written for students in Purdue’s CS 252 course. Hopefully the information will be useful to others as well, but there may be some references that don’t make sense. Hello fellow CS 252 student! Process groups are quite an important part of how shells and terminals function, so I was a bit sad to find out that CS 252 neglects to cover them at all. I decided to learn about them on my own and implement them in my shell....

March 30, 2025 · 14 min · Kian Kasad

Profiling ZSH: How I made my shell start 90% faster

Over the years, my .zshrc has grown to include many tricks & tools I rely on daily. But it also meant that my shell took a fair amount of time to start up, around 1 second: 1 2 3 $ time zsh -i -c exit ... zsh -i -c exit 0.31s user 0.14s system 47% cpu 0.949 total One second may not sound like a lot, but it meant that every time I opened a new terminal tab, my shell prompt wouldn’t show up until after I started typing....

July 18, 2024 · 9 min · Kian Kasad

Start Docker containers on-demand with systemd socket activation

If you have a Docker container which is running all the time but is used infrequently, it may be a good idea to start the container only when a connection is received. This is particularly useful for resource-intensive servers. In my case, I use this for a Minecraft server, which can take several gigabytes of memory even when idle, so I want to keep it running as little as possible....

June 17, 2024 · 7 min · Kian Kasad