RSSAmplifier

Blog

Julien Enselme personal blog

jujens.euRSS feed ↗20 posts

Latest posts

ZSH autocomplete issues in containers

When I use ZSH with a custom theme or with starship in a container, sometimes completion is broken: I type some characters (let’s say ts ) then TAB for autocompletion and I’ll get the characters I typed and then the completion (in my example, tstsc for tsc ). This doesn …

Jouer sous Linux

Après plusieurs tests infructueux l’année dernière, j’ai décidé de retester le jeu sous Linux en avril 2025 avec une nouvelle config. Et je dois admettre que ça fonctionne vraiment très bien. Je n’ai presque pas de problèmes et un seul jeu aurait nécessité de repasser sous Windows …

Gaming on Linux

After several unsuccessful tests last year, I decided to retest gaming on Linux in April 2025 with a new setup. And I have to admit that it works really well. I had almost no problems and only one game would have required switching back to Windows while waiting or a …

My shell config

I discovered a lot of tools this year, most of them I now rely on daily. So I thought it would be a nice time to share them with various custom configs I wrote. TL;DR: install zoxide , direnv , starship and atuin and have this in your .zshrc (or .bashrc …

À propos de mon blog

Après plus de dix ans, voici mon 200e article de blog ! J’ai décidé que ce serait un bon moment pour faire un point sur ces années et envisager le futur. J’ai démarré ce blogue en 2013 alors que j’étais encore étudiant à Centrale Marseille. Il était alors …

About my blog

After more than ten years, this is my 200th blog post! Well technically, the French version is the 200th post and this one the 201st because of how Pelican counts them. I decided it would be a good time to take a look back and one ahead. I started this …

My opinion on Django Ninja

If you’re using the Django web framework (DRF) and are building APIs, you probably know about the Django Rest Framework a toolkit to build APIs in Django since more than a decade (the first 3.x version was released in 2014). It’s great and I’ve used it …

Some tips on observables

You can download …

My opinions on HTMX

HTMX is a JavaScript library designed to add interactivity to your web pages. With it, you don’t build a single page application, you use standard templates (written in Django, Jinja) rendered in your backend, add attributes to your HTML elements and let HTMX add the appropriate interactivity. From what …

Simply how licenses are applied to your project with SPDX and reuse

SPDX (Software Package Data Exchange) is a project managed by the Linux Foundation created to standardize how licenses are identified in a human and machine-readable way. In a nutshell, instead of adding a big header to your files to identify the applicable license, you apply a copyright text and a …

Using super to reuse method with inheritance in Python

If you use Python, you probably already know of super to call a method from the base class. You probably also know you can use a function as a method if it takes the instance as 1st parameter. What you cannot do is call super().my_method() directly in such a …

Promise returned by async functions

Recently at work, I encountered a problem with a function that should have returned a custom promise subclass. The goal of this subclass is to be able to call a cancel method to cancel some pending action done within the promise and then reject it. It looks like this: class …

Using JavaScript and TypeScript in jupyter notebook

While wondering how to run some tests with JavaScript, I discovered that deno , a JavaScript runtime like NodeJS, has support for jupyter notebooks thanks to this article . It works perfectly. Install deno (probably available in your distribution repositories), run deno jupyter --install and you are good to go! To get …

Using Pydantic models within enums

In previous articles, I provided some tips on enums and explained how to use a custom class with Pydantic . Now, I’ll dig into all kinds of enum usages with Pydantic, including enums whose members are Pydantic models themselves! Let’s dive right in! Just like before, you can access …

Reusing Pydantic validators and serializers

I’ll give some tips to reuse field and model validators and serializers. All my examples will use validators, but it works exactly the same for serializers. Field validators Assign the validator to a variable like so: def _is_above_ten ( value : int ): if value > 10 : return value raise ValueError ( f " { value …

Using Pydantic with custom classes

Pydantic is an awesome data validation library for Python. It’s getting very popular these days because it’s fast, has lots of features and is pleasant to use. I’m using it at work and in personal projects. It’s one of the strong points of FastAPI , the new …

Converting jupyter notebooks

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 …

Sending all nginx logs to journald

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 …

Some tips on Python’s enums

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 for a more advanced article I hope to write soon. Let’s dive right in! auto By using the function enum.auto …

PostgreSQL using ANY instead of IN

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 lists while IN doesn’t. Psycopg will also correctly adapt …