Converting jupyter notebooks

Posted on 2025-04-17 in Trucs et astuces • Tagged with Python

You can export a notebook directly from the interface under File > Save and Export Notebook As. You can also do it in CLI with:

jupyter nbconvert --execute --to <FORMAT> my_notebook.ipynb

The --execute will execute the notebook to make sure all output cells are up to date. Many export formats …


Continue reading

Sending all nginx logs to journald

Posted on 2025-04-13 in Trucs et astuces • Tagged with systemctl, Linux

As part of my work to uniformize my server setup around systemd, I decided to make nginx log everything with journald. By default, it logs accesses and errors in log files under /var/log/nginx. I already had one log file per vhost.

To do the change, I changed my …


Continue reading

Some tips on Python’s enums

Posted on 2025-04-12 in Programmation • Tagged with Python

I’d like to share a few tips I recently (re)discovered about Python’s enums. While interesting on its own, this article is also paving the way on a more advanced article I hope to write soon. Let’s dive right in!

auto

By using the function enum.auto …


Continue reading

PostgreSQL using ANY instead of IN

Posted on 2025-03-31 in Trucs et astuces • Tagged with PostgreSQL, Database

I recently learned while reading psycopg’s documentation (a Python driver for PostgreSQL), that you should use WHERE id = ANY(:values) instead of WHERE id IN :values when filtering over lists. That’s because the ANY operator works with empty list while IN doesn’t. Psycopg will also correctly adapt …


Continue reading

Monitor certificates statuses

Posted on 2025-03-30 in Trucs et astuces

Let’s encrypt recently announced they will stop sending emails when certificates must be renewed. Following this announcement, I created a small script to monitor the status of my certificates and receive an email if they are not renewed in time. Since it can be handy, here it is!

The …


Continue reading

From matomo to plausible

Posted on 2025-03-09 in Blog • Tagged with Web

For several years, I hosted my own Matomo instance to track traffic on my blog and projects while respecting the privacy of my users. It worked well, but it was the only service I had running on MariaDB. All the other ones are running on PostgreSQL. And I had several …


Continue reading

Writing a browser extension

Posted on 2025-02-16 in Programmation • Tagged with Web

I recently wrote a browser extension for Firefox and Chromium based browsers for my Legadilo (RSS feeds aggregator and articles saver) project. The goal is to make it easier and faster to save an article or to subscribe to a feed directly on a web page without forcing you to …


Continue reading

Using podman for containers

Posted on 2025-02-09 in Programmation • Tagged with Docker, podman, containers, systemctl, Linux

Podman is an alternative to Docker and Docker compose. It uses the same CLI interface than Docker and uses the same standardized image format. So you can use an image built with Docker with it or build an image and then use it with Docker. Its podman-compose command is compatible …


Continue reading

Systemd Timers

Posted on 2025-02-01 in Programmation • Tagged with systemctl, Linux

After using anacron for years to run a backup script regularly, I decided to have a look at systemd timers. Overall, anacron worked fine: I could run tasks as my user and it would start tasks if they missed a run. But, I was still frustrated with how it worked …


Continue reading

My take on UV and Ruff

Posted on 2025-01-25 in Programmation • Tagged with Python

I recently tried the new and shiny tools made by astral. I only used them on my personal projects yet, but I’m still very impressed! You may already have heard of them. I’ll try to keep the article concise and won’t dig too deep into the tools …


Continue reading