All Posts

Cleaning up side projects

Over the years, I have accumulated various ongoing/past side projects where I tinkered with mostly unstructured stuff. I decided it was time to let them go. My initial learnings were great, but I realized it’s impossible to keep up with everything while having a full-time job. Maintenance cost - domains, servers/storage, and mostly - time - was not worth the return.

Gaming on Apple M1

Is it possible? Yes. Does it make sense? Probably no. Under the Apple M1 chip, you have two options: Crossover or Parallels. The first one is supposed to be more performant. The latter allows you to install Windows 11 ARM (get it via Windows Insider Preview program), which is supposed to cover more software and runs DirectX12.

Problems with inexperienced teams and Ruby

I have been coding in Ruby for over ten years, and I have had a chance to see some real-life codebases created by in-house teams, contracts, and software houses of all skills. Inexperienced folks that don’t have guardrails in the form of mentors can create stuff I have never dreamed of. In my nightmares, that is.

Moddable by default

I have a huge sentiment for Quake 3; that’s no shock, given I’m still keeping running. The significant factor of its popularity was that it was moddable and OSP, CPMA, and many more had their communities of gamers, mappers, and content creators.

How to encode videos on Synology NAS

If you’re trying to get FFmpeg onto your NAS - try no more. There is a more user-friendly alternative - an open-source video transcoder called HandBreak. Amazingly you can run it as a docker container. Here is how I run it:

From Crystal to Elixir

I babysit a few of my pet projects, including moviestowatch site that used to query IMDB for ratings & reviews and compare both (used to, after IMDB redesigned their page and everything broke). I wrote it 4 years ago in Crystal based on simple kemal web framework. As you can imagine, a four-year-old app written in a language that wasn’t even stable at that point is next to impossible to maintain. I took this as an opportunity to rewrite it using Elixir and Phoenix framework. Just for the sake of the learning experience.

Logging on Nomad with Loki and Grafana Cloud

This blog post is an excellent point of reference on how you can approach the logging aggregation problem while on Nomad. As I’m using Consul, I followed a slightly different approach. I have decided to deploy promtail as a global service on each node and scrape the /var/nomad/alloc/*logs/* directory. Additionally, I slurp systemd-journal to debug potential system services issues as well. I’m not fully convinced that this is the right way. Still, it seems to do the job - even if the given service doesn’t exist on the particular host that promtail is running on - nothing terrible happens - allocation id directory won’t exist on that host, so we will never scrape anything. The most significant upside here is that scrapings logs from new/existing services require adding a service tag - no need to configure extra sidecar service for each job. So it’s a really continent solution.

Remote communication tips

It’s astonishing how many companies are still struggling with the remote culture. The worst-case scenario is when people responsible for fostering culture don’t see the problem. Communication was always crucial. With the remote setup, it’s even more vital as writing is simply hard and requires practice. Slack already has an excellent article about etiquette - bookmark it to your general channel or add it to the onboarding guide! I want to recap a few points from that list and add a few own pointers.

How to backup Postgres database with Nomad

…or rather: How I choose to backup databases when using Nomad. When I was researching backup options after switching to Nomad, I considered using something like docker-db-backup. I quickly realized one downside of having to remember to align postgres-client (backup container) with the version of the server (database container). And as I was running at that time five different databases (Postgres/MySQL) it was a deal-breaker for me. After more reading, I have decided to write a bash script that would be using Nomad’s raw_exec and cron capabilities.

Maintaining 10-year-old Rails app

I still maintain - a site established around 1998, which was the biggest portal dedicated to Quake 3 Arena on the polish side of the internet. Nowadays, the traffic there is insignificant, but it had a great run and a very vibrant community back in the golden days. I inherited its original PHP codebase like 12-13 years ago, and over 10 years ago, I decided to rewrite it to Rails. So it was my first more significant, serious Rails project - which real users and actual data.