<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Some tech notes</title>
    <link>https://www.yvesdennels.com/</link>
    <description>Recent content on Some tech notes</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Tue, 11 Feb 2025 13:54:19 +0100</lastBuildDate><atom:link href="https://www.yvesdennels.com/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Remove last newline with vim</title>
      <link>https://www.yvesdennels.com/posts/remove-last-eol-with-vim/</link>
      <pubDate>Tue, 11 Feb 2025 13:54:19 +0100</pubDate>
      
      <guid>https://www.yvesdennels.com/posts/remove-last-eol-with-vim/</guid>
      <description>I was writing some tests for Asfaload and I needed to validate that a JSON file is generated correctly. I needed the file to be a one-line file, with no End Of Line character (I probably could have done it an other way, working with a file having an EOL, but let&amp;rsquo;s not consider this for the sake of this blog post).
On a unix platform, when you save a file with vim, it will add a EOL character if there is none.</description>
    </item>
    
    <item>
      <title>Using Remark42 as commenting system with Soupault</title>
      <link>https://www.yvesdennels.com/posts/remark42-commenting/</link>
      <pubDate>Mon, 19 Aug 2024 14:07:19 +0200</pubDate>
      
      <guid>https://www.yvesdennels.com/posts/remark42-commenting/</guid>
      <description>I&amp;rsquo;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&amp;rsquo;s how we got to Remark42, which supports OAuth authentication with many provides, but also authentication by email, and even anonymous comments.</description>
    </item>
    
    <item>
      <title>Using Renovate with Gitlab</title>
      <link>https://www.yvesdennels.com/posts/gitlab-renovate/</link>
      <pubDate>Wed, 28 Feb 2024 14:44:19 +0100</pubDate>
      
      <guid>https://www.yvesdennels.com/posts/gitlab-renovate/</guid>
      <description>Here&amp;rsquo;s a step by step guide to using Renovate with Gitlab. These notes are based on the Renovate Runner&amp;rsquo;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&amp;rsquo;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.</description>
    </item>
    
    <item>
      <title>Supercharging your static site with htmx and soupault</title>
      <link>https://www.yvesdennels.com/posts/supercharging_static_site_with_htmx_soupault/</link>
      <pubDate>Mon, 06 Nov 2023 10:31:06 +0100</pubDate>
      
      <guid>https://www.yvesdennels.com/posts/supercharging_static_site_with_htmx_soupault/</guid>
      <description>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.</description>
    </item>
    
    <item>
      <title>Upgrading postgres on docker swarm</title>
      <link>https://www.yvesdennels.com/posts/upgrading_postgres_on_docker_swarm/</link>
      <pubDate>Mon, 25 Sep 2023 16:00:41 +0200</pubDate>
      
      <guid>https://www.yvesdennels.com/posts/upgrading_postgres_on_docker_swarm/</guid>
      <description>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&amp;rsquo;s how I upgraded it.
The setup I&amp;rsquo;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.</description>
    </item>
    
    <item>
      <title>Build your specialised editor with vim</title>
      <link>https://www.yvesdennels.com/posts/build_specialised_editor_with_vim/</link>
      <pubDate>Mon, 07 Aug 2023 08:49:31 +0200</pubDate>
      
      <guid>https://www.yvesdennels.com/posts/build_specialised_editor_with_vim/</guid>
      <description>Intro In this post we&amp;rsquo;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.</description>
    </item>
    
    <item>
      <title>Websharper super power with Vars</title>
      <link>https://www.yvesdennels.com/posts/websharper_super_power_vars/</link>
      <pubDate>Thu, 30 Mar 2023 07:43:56 +0000</pubDate>
      
      <guid>https://www.yvesdennels.com/posts/websharper_super_power_vars/</guid>
      <description>#WebSharper&amp;rsquo;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&amp;rsquo;s no need to handle low-level concerns like XMLHttpRequest or data serialisation. There&amp;rsquo;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.</description>
    </item>
    
    <item>
      <title>Deploying Gitlab Runner on Your Workstation</title>
      <link>https://www.yvesdennels.com/posts/deploying-gitlab-runner-on-your-workstation/</link>
      <pubDate>Thu, 16 Mar 2023 10:56:56 +0100</pubDate>
      
      <guid>https://www.yvesdennels.com/posts/deploying-gitlab-runner-on-your-workstation/</guid>
      <description>Gitlab limited the number of CI minutes freely available, and although I&amp;rsquo;m working on an opensource project and could possibly apply to get more free minutes, I decided not to if possible. I&amp;rsquo;m happy to be able to use their service freely, and in their competition with a megacorp, I&amp;rsquo;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&amp;rsquo;m developing on has a lot of spare resources, which I would be happy to use to run CI jobs.</description>
    </item>
    
    <item>
      <title>Editing an apparmor profile</title>
      <link>https://www.yvesdennels.com/posts/editing_an_apparmor_profile/</link>
      <pubDate>Wed, 22 Feb 2023 11:10:35 +0100</pubDate>
      
      <guid>https://www.yvesdennels.com/posts/editing_an_apparmor_profile/</guid>
      <description>I had Suckless&#39; 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&amp;rsquo;m not sure this is required).</description>
    </item>
    
    <item>
      <title>Manipulating javascript objects in FSharp with WebSharper</title>
      <link>https://www.yvesdennels.com/posts/websharper_manipulating_javascript_objects/</link>
      <pubDate>Thu, 16 Feb 2023 14:21:59 +0100</pubDate>
      
      <guid>https://www.yvesdennels.com/posts/websharper_manipulating_javascript_objects/</guid>
      <description>In a WebSharper app I&amp;rsquo;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.</description>
    </item>
    
    <item>
      <title>Websharper compilation problem after dotnet update</title>
      <link>https://www.yvesdennels.com/posts/websharper_problem_after_dotnet_update/</link>
      <pubDate>Wed, 15 Feb 2023 11:08:54 +0100</pubDate>
      
      <guid>https://www.yvesdennels.com/posts/websharper_problem_after_dotnet_update/</guid>
      <description>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.</description>
    </item>
    
    <item>
      <title>Docker ipv6 setup</title>
      <link>https://www.yvesdennels.com/posts/docker_ipv6_nat/</link>
      <pubDate>Tue, 07 Feb 2023 10:07:09 +0100</pubDate>
      
      <guid>https://www.yvesdennels.com/posts/docker_ipv6_nat/</guid>
      <description>If you enable ipv6 for your docker containers with these lines in your /etc/docker/daemon.json like illustrated in the official documentation,
 { &amp;quot;ip6tables&amp;quot;: true, &amp;quot;fixed-cidr-v6&amp;quot;: &amp;quot;2001:db8:1::/64&amp;quot; } your containers will get an ip from the range 2001:db8:1::/64.
But this range is just used as an example in the documentation, and has nothing special. It is a normal routable range. It is advised to not reuse that range if it was not assigned to you.</description>
    </item>
    
    <item>
      <title>Docker Swarm in 2023</title>
      <link>https://www.yvesdennels.com/posts/docker_swarm_in_2023/</link>
      <pubDate>Tue, 24 Jan 2023 15:44:08 +0100</pubDate>
      
      <guid>https://www.yvesdennels.com/posts/docker_swarm_in_2023/</guid>
      <description>Staying with Docker Swarm in 2023 TL;DR: Things seem to move favorably for Docker Swarm.
Last year I started to use Docker Swarm on a single node swarm, wondering if it was the right choice, with all attention going to Kubernetes. I went for Swarm because the possibilities offered by Kubernetes were not worth the price to pay in complexity.
Nearly one year later, I&amp;rsquo;m happy with my choice. Docker Swarm brings enough flexibility for me (as for a lot of situations for a lot of people I think), and deploying and managing it was a pleasure.</description>
    </item>
    
    <item>
      <title>Identify the container of a task in a docker swarm</title>
      <link>https://www.yvesdennels.com/posts/identify_container_docker_swarm/</link>
      <pubDate>Wed, 14 Dec 2022 14:13:37 +0100</pubDate>
      
      <guid>https://www.yvesdennels.com/posts/identify_container_docker_swarm/</guid>
      <description>When maintaining a Docker Swarm, you might need to take actions on a specific container, possibly identified by a task id logged by docker. But in Swarm, you run and manage services on multiple nodes, you don&amp;rsquo;t have directly access to the containers. Here&amp;rsquo;s how to get to the containers.
1) Identify the node running the container You can list all tasks running for a service with docker service ps $SERVICE_NAME.</description>
    </item>
    
    <item>
      <title>Not missing init Containers with Docker Swarm</title>
      <link>https://www.yvesdennels.com/posts/not_missing_init_containers_with_docker_swarm/</link>
      <pubDate>Tue, 13 Dec 2022 09:38:39 +0100</pubDate>
      
      <guid>https://www.yvesdennels.com/posts/not_missing_init_containers_with_docker_swarm/</guid>
      <description>Kubernetes has the concept of init containers. This does not exist in Docker Swarm, and the depends_on is ignored when deploying to a swarm. There are situation when the init containers are convenient, but in my Docker Swarm usage this doesn&amp;rsquo;t seem to cause trouble: before I discovered that depends_on is a no-op when deploying to a Swarm, I used it to (I thought) simulate init containers! Let&amp;rsquo;s see my usage scenario.</description>
    </item>
    
    <item>
      <title>Handling Large Uploads in Fsharp and ASP.Net Core</title>
      <link>https://www.yvesdennels.com/posts/large_uploads_fsharp_asp_net_core/</link>
      <pubDate>Fri, 09 Dec 2022 11:49:31 +0100</pubDate>
      
      <guid>https://www.yvesdennels.com/posts/large_uploads_fsharp_asp_net_core/</guid>
      <description>I found the documentation regarding handling large uploads in a ASP.Net Core app confusing. I didn&amp;rsquo;t find a lot of code examples, and even none at all using F#.
Eventually I found an example I could get inspiration from and build a working solution with. It should work with whatever ASP.Net Core based framework you use, as long as you can get a handle on the Microsoft.AspNetCore.Http.HttpContext instance. You will need to clarify some things before you put the code in production.</description>
    </item>
    
    <item>
      <title>Using the gitlab registry</title>
      <link>https://www.yvesdennels.com/posts/using_the_gitlab_registry/</link>
      <pubDate>Tue, 22 Nov 2022 10:24:49 +0100</pubDate>
      
      <guid>https://www.yvesdennels.com/posts/using_the_gitlab_registry/</guid>
      <description>Here&amp;rsquo;s an easy workflow to use the container registry make available to Gitlab projects. You first need to create a token. A Personal Access Token is usable with any project you have access to. A Deploy token is scoped to a group or a project.
Personal Access Token If you decide to use a Personal Access Token you first need to create one with the api access. As mentioned in the doc, you can do this on the gitlab.</description>
    </item>
    
    <item>
      <title>Dotnet debugging with VSCodium on Linux</title>
      <link>https://www.yvesdennels.com/posts/dotnet_debugging_with_vscodium/</link>
      <pubDate>Wed, 19 Oct 2022 15:30:15 +0200</pubDate>
      
      <guid>https://www.yvesdennels.com/posts/dotnet_debugging_with_vscodium/</guid>
      <description>VsCodium is the FOSS version of Visual Studio Code, i.e. it is the same code without the private/proprietary addition added when Microsoft packages it. Making it possible to package and publish VSCodium is great, but, without getting in the discussion of how lame this is, the dotnet debugger published by Micro$oft can only be used by Micro$oft published software, meaning not VSCodium. (Did you know the same restriction applies to usage of the VSCode Marketplace?</description>
    </item>
    
    <item>
      <title>Vagrant image with docker using packer</title>
      <link>https://www.yvesdennels.com/posts/vagrant_image_with_docker_using_packer/</link>
      <pubDate>Wed, 12 Oct 2022 16:43:20 +0200</pubDate>
      
      <guid>https://www.yvesdennels.com/posts/vagrant_image_with_docker_using_packer/</guid>
      <description>I wanted to test a docker setup and the easiest was to do it in a vm. I was looking for a solution as easy as docker, and went with Vagrant. To have a vagrant-managed vm it&amp;rsquo;s possible to use an existing box, but I&amp;rsquo;m more comfortable knowing exactly what&amp;rsquo;s in the boxes I use, so I decided to build one with Packer. This post is based on this blog post and the config and scripts used are public.</description>
    </item>
    
    <item>
      <title>Jsonnet Training Intro Available for Feedback</title>
      <link>https://www.yvesdennels.com/posts/jsonnet-training-intro-available-for-feedback/</link>
      <pubDate>Tue, 13 Sep 2022 15:39:25 +0200</pubDate>
      
      <guid>https://www.yvesdennels.com/posts/jsonnet-training-intro-available-for-feedback/</guid>
      <description>If you read this blog, you might have understood I&amp;rsquo;m a Jsonnet fan. To help people getting started with Jsonnet, I have prepared an online training. Here&amp;rsquo;s the first chapter, an introduction showing why you should be interested in Jsonnet. As this is my first online training production, your feedback is very welcome at yvesdennels@gmail.com.
  I hope this video raises you interest in Jsonnet. If you&amp;rsquo;re a self-learner, go to jsonnet.</description>
    </item>
    
    <item>
      <title>Gitops for Swarm Using Private Registry</title>
      <link>https://www.yvesdennels.com/posts/gitops-for-swarm-using-private-registry/</link>
      <pubDate>Wed, 07 Sep 2022 15:54:31 +0200</pubDate>
      
      <guid>https://www.yvesdennels.com/posts/gitops-for-swarm-using-private-registry/</guid>
      <description>We will see how to store the compose files of a Docker Swarm in git, together with encrypted authentication data to retrieve images from private repositories. We will access a private registry hosted by Gitlab. Authentication to the registry is done with a deploy token, which gives you a username and password giving access only to the relevant registry.
Docker authentication Authentication to a docker registry is done with the command docker login -u $login --password $password (or alternatively with --password-stdin to avoid putting the password on the command line).</description>
    </item>
    
    <item>
      <title>Starting With Kapitan</title>
      <link>https://www.yvesdennels.com/posts/starting-with-kapitan/</link>
      <pubDate>Tue, 06 Sep 2022 14:57:57 +0200</pubDate>
      
      <guid>https://www.yvesdennels.com/posts/starting-with-kapitan/</guid>
      <description>Kapitan is a tool generating configuration files (and more), handling extension of configs and overriding of values. It is great when you need to generate complex configurations or config files that slightly differ by being used in slightly different scenarios. For example staging vs production, or client A vs client B. It is supporting multiple templating approaches, my favourite being jsonnet, which is the only we will cover here. It can be used to generated Kubernetes configurations, but not only.</description>
    </item>
    
    <item>
      <title>Deploy authelia on swarm</title>
      <link>https://www.yvesdennels.com/posts/deploy_authelia_on_swarm/</link>
      <pubDate>Mon, 29 Aug 2022 14:43:42 +0200</pubDate>
      
      <guid>https://www.yvesdennels.com/posts/deploy_authelia_on_swarm/</guid>
      <description>Intro I started using Docker Swarm in 2022 and am still very satisfied with it. I am currenyl using it as a one node swarm. This post assumes you deployed Swarm with a Traefik reverse proxy as described on DockerSwarm.rocksi, that all services are deployed under the doomain stored in the DOMAIN environment variable, and that the variable DOCKER_HOST is set correctly.
I wanted to test authelia for protecting a web app to be deployed on a Docker Swarm, and I decided to test it on an existing Docker Swarm.</description>
    </item>
    
    <item>
      <title>Edit a file on a docker swarm volume</title>
      <link>https://www.yvesdennels.com/posts/edit_file_on_docker_swarm_volume/</link>
      <pubDate>Sun, 28 Aug 2022 15:35:18 +0200</pubDate>
      
      <guid>https://www.yvesdennels.com/posts/edit_file_on_docker_swarm_volume/</guid>
      <description>Editing a file stored on a container volume in production is a very bad idea. You should not do it and pass all configuration through your container orchestrator. Using a single node Docker Swarm for test purposes, it can be a huge time saver though.
Here&amp;rsquo;s how to do it. Ensure that your DOCKER_HOST environment is set such that running docker volume ls will show the volume storing the file you want to edit (let&amp;rsquo;s call this volume myvol).</description>
    </item>
    
    <item>
      <title>Ddefine a f# function using reflection</title>
      <link>https://www.yvesdennels.com/posts/fsharp_define_function_by_reflection/</link>
      <pubDate>Wed, 10 Aug 2022 00:07:34 +0200</pubDate>
      
      <guid>https://www.yvesdennels.com/posts/fsharp_define_function_by_reflection/</guid>
      <description>#Intro
I looked at this thinking it would be useful with WebSharper.Forms definition. I was wrong, but I want to keep a trace of this, so here is a blog post about it. This post is not meant to be pedagogical, but it can be useful as an example.
We&amp;rsquo;ll work on an example DU type hypothetically used to describe form fields:
type DataType = |String of name:string |Int of name:string |Choice of name:string * string list You can use this type to define forms.</description>
    </item>
    
    <item>
      <title>Websharper Proxy Project</title>
      <link>https://www.yvesdennels.com/posts/websharper-proxy-project/</link>
      <pubDate>Wed, 13 Apr 2022 00:00:00 +0200</pubDate>
      
      <guid>https://www.yvesdennels.com/posts/websharper-proxy-project/</guid>
      <description>WebSharper lets you bring your FSharp code to the client-side. For types in your WebSharper project to be used at both server and client sides, you annotate them with [&amp;lt;JavaScript&amp;gt;].
For types that were compiled without WebSharper, you need to define a proxy type, which will be compiled to javascript and be used in place of the compiled type. This is done easily, as this example from the official documentation shows:</description>
    </item>
    
    <item>
      <title>Sending Mails In Aspnetcore</title>
      <link>https://www.yvesdennels.com/posts/sending-mails-aspnetcore/</link>
      <pubDate>Mon, 21 Mar 2022 00:15:27 +0100</pubDate>
      
      <guid>https://www.yvesdennels.com/posts/sending-mails-aspnetcore/</guid>
      <description>This post is part of series starting here.
Here&amp;rsquo;s how I configure my mailers in a ASP.Net Core project developed in F#. I define an interface:
type IMailer = // to * subject * body  abstract Send: string * string * string -&amp;gt; unit of which I have 2 implementation. The first one is for development as it simply prints the mail on the server&amp;rsquo;s standard output:
type ConsoleMailer() = interface IMailer with member _.</description>
    </item>
    
    <item>
      <title>Passwordless Login Sending Login Mail Websharper</title>
      <link>https://www.yvesdennels.com/posts/passwordless-login-sending-login-mail-websharper/</link>
      <pubDate>Mon, 14 Mar 2022 00:15:27 +0100</pubDate>
      
      <guid>https://www.yvesdennels.com/posts/passwordless-login-sending-login-mail-websharper/</guid>
      <description>This post is part of series starting here.
Sending the mail Sending the mail is not hard, but will show how code running at the client side can call RPC functions provided by the server. These calls are totally transparent.
For the login page, we add an endpoint:
| [&amp;lt;EndPoint &amp;#34;/l&amp;#34;&amp;gt;] Login and map it to a function all as seen earlier:
Application.MultiPage (fun ctx endpoint -&amp;gt; match endpoint with | EndPoint.</description>
    </item>
    
    <item>
      <title>Passwordless Login With Websharper</title>
      <link>https://www.yvesdennels.com/posts/passwordless-login-websharper/</link>
      <pubDate>Mon, 07 Mar 2022 00:00:00 +0100</pubDate>
      
      <guid>https://www.yvesdennels.com/posts/passwordless-login-websharper/</guid>
      <description>Intro I had the need recently to provide some admin access to a web application, but adding password management in that application was not worth the trouble. It was much easier to allow users to request a authentication link by email, as this post will show. The web app is dveloped in WebSharper. If you&amp;rsquo;re a F# developed, you should really check it out! I like that I can develop client and server in one integrated code base, all in F#.</description>
    </item>
    
    <item>
      <title>Docker Swarm in 2022</title>
      <link>https://www.yvesdennels.com/posts/docker-swarm-in-2022/</link>
      <pubDate>Sun, 06 Mar 2022 15:56:27 +0100</pubDate>
      
      <guid>https://www.yvesdennels.com/posts/docker-swarm-in-2022/</guid>
      <description>Going with Docker Swarm in 2022 TL;DR: Docker Swarm is probably good enough in a lot of cases. See the update for 2023
Having worked professionally on setting up, customising and deploying Kubernetes (but without pretending to be a specialist), I didn&amp;rsquo;t want to go down that path for my personal infrastructure, even if using Jsonnet was of great help (see my Jsonnet course here). I tried Nomad which worked fine, but getting it to do what I wanted was taking more time than I hoped.</description>
    </item>
    
  </channel>
</rss>
