Skip to content

Some tech notes

Using Remark42 as commenting system with Soupault

I’m currently working on Asfaload and with the aim of having a better interaction with users, we needed to add a commenting system. As the website is also managed with Soupault, we looked for a solution to be integrated in a static site generator, while still respecting the privacy of our visitors. That’s how we got to Remark42, which supports OAuth authentication with many provides, but also authentication by email, and even anonymous comments.

Using Renovate with Gitlab

Here’s a step by step guide to using Renovate with Gitlab. These notes are based on the Renovate Runner’s documentation. The documentation is complete, but still required me to wonder how exactly to set it up. This is probably my fault, but if you’re like me, this guide will help you set it up without thinking much. Create a gitlab account for your Renovate runner Just register an account at Gitlab, eg my-renovate-bot-account.

Supercharging your static site with htmx and soupault

We will use Soupault as a static website framework that we will use to manipulate the HTML of pages generated by Hugo. Although Soupault itself can be used as a static site generator, this is not how we will use it here. The goal of this post is to enhance the Hugo website with htmx, and more specifically with hx-boost and htmx preload. hx-boost will load pages with AJAX requests and update the body and title of the page with data retrieved.

Upgrading postgres on docker swarm

Upgrading Postgresql deployed on Docker Swarm I have deployed an app in staging on Docker Swarm, and it uses a postgresql database, using the Docker image with version 15.4. With Postgresql 16.0 published recently, here’s how I upgraded it. The setup I’m using a one-node Docker Swarm, but I suspect this should apply to multi-nodes as well. The postgresql container of the stack is pinned to a specific node, and is mounting the host directory /data/myowndb/db at /var/lib/postgresql/data for data persistence.

Build your specialised editor with vim

Intro In this post we’ll see how easy it is to configure vim to get a specialised editor. You only have to remember that any command-mode instruction you have available inside vim (those commands you type preceded by : to enter the command mode), can also be passed on the command line by prefixing the command with a + rather than a : (or use the flag -c). Those are iso-called Ex commands.

Websharper super power with Vars

#WebSharper’s super power with Vars Using WebSharper allows you to develop both the client side and the server side of a web application in C# or F#, with client to server communication abstracted as RPC calls. There’s no need to handle low-level concerns like XMLHttpRequest or data serialisation. There’s great Javascript interoperability of course, allowing to use javascript libraries from your F# code. But still, what I enjoy most when developing a WebSharper app is its reactive layer built on Vars and Views.

Deploying Gitlab Runner on Your Workstation

Gitlab limited the number of CI minutes freely available, and although I’m working on an opensource project and could possibly apply to get more free minutes, I decided not to if possible. I’m happy to be able to use their service freely, and in their competition with a megacorp, I’d rather not participate in unnecessarily using their limited financial means. Most deployment of Gitlab Runners are probably done on servers, but the workstation I’m developing on has a lot of spare resources, which I would be happy to use to run CI jobs.

Editing an apparmor profile

I had Suckless' Surf installed but had troubles using it with pages not opening and apparmor denies in dmesg. This post is not a tutorial but just a reminder on how to edit the profile for an executable, in this case /usr/bin/surf. The profile is located at /etc/apparmor.d/usr.bin.surf and can be augmented with the file at /etc/apparmor.d/local/usr.bin.surf. The second file is included in the first one, and I indented its content similarly as how it would be indented had it been written directly in the including file (but I’m not sure this is required).

Manipulating javascript objects in FSharp with WebSharper

In a WebSharper app I’m using Bootstrap tooltips, and those need to be initialised explicitly. As shown in the doc this is easily done. For example this code will make the tooltip work as expected for the element with id elementId, so that hovering that element will trigger the tooltip to be shown: var el = document.getElementById(elementId) new bootstrap.Tooltip(el) However, in my case, the element for which a tooltip should be shown is dynamically added and removed from the document following user actions.

Websharper compilation problem after dotnet update

If you encounter problems compiling your WebSharper project after an update of your dotnet installation, you might have to restart the service wsfscservice. Under linux you can simply issue the command pkill wsfscservice. wsfscservice is used to speed up repeated compilation. As explained by Jand42:it uses AssemblyLoadContext for WS macros/offline site generator, but F# compiler part can sadly lock some dlls for TPs and it seems SDK update messes with it too.