Shutdown Kubernetes

Posted on 2022-01-30 in Programmation • Tagged with Devops, Kubernetes

It can be a good idea to shutdown part of your infrastructure when you don't need it. It will help you reduce costs and your environmental impact. It is however, not always easy to actually do it.

In this article, I'll talk here about how to shutdown a Kubernetes based …


Continue reading

Testing the re-frame Clojure frontend framework

Posted on 2022-01-16 in Programmation • Tagged with JavaScript, Clojure

I wanted to test re-frame a Clojure framework for building user interfaces. It is built on top of Reagent a Clojure library to interface with React in ClojureScript. The main goal of this framework is to help you manage the state of your application. To do that, you need to …


Continue reading

Testing the Svelte JS framework

Posted on 2022-01-03 in Programmation • Tagged with JavaScript

After hearing good things about the Svelte JS framework, I decided to give it a try. To test it, I did something very original: the classic TODO app. You can see a picture of the end result on the screenshot below.

The styled app

Here are my impressions after this tests:

  • Despite using …

Continue reading

My take on GKE auto-pilot mode

Posted on 2021-10-17 in Programmation • Tagged with security, gcp, gke, kubernetes

I recently switched from a standard GKE cluster where I had to manage nodes to an autopilot one where Google does it for me. I must say the switch was easy to do (despite an interruption of our services) and greatly simplified the management of the cluster.

I noticed this …


Continue reading

Generate PDF from React components

Posted on 2021-09-26 in Programmation • Tagged with JavaScript, React, Chrome, Puppeteer

How do you generate a PDF from any React components? I am not talking about just allowing your users to print a page into a PDF with their browser, I am talking about transforming a page as PDF programmatically and saving it server side. The idea is for our user …


Continue reading

Build a sequence that is reset everyday

Posted on 2021-04-08 in Programmation • Tagged with Django, Python, PostgreSQL

How to create a database sequence that will be reset everyday? That is a sequence that will get one the first time of each day? It sounds easy but it's not that much.

Note

This article will focus on PostgreSQL since it's the database I use. A similar solution may …


Continue reading

Make JS code communicate with a ServiceWorker

Posted on 2020-08-18 in Programmation • Tagged with JavaScript, Web, ServiceWorker

If you need to send data from your JS code to your ServiceWorker, you can do it like this:

navigator.serviceWorker.register("./sw.js").then(registration => {
    registration.active.postMessage("Some message");
});

You can then rely on this code in the ServiceWorker to read the message:

self.addEventListener("message", event => {
    console …

Continue reading

Should you build a SPA?

Posted on 2020-06-15 in Programmation • Tagged with JavaScript, Web, Django

This article is an update to a previous article why you want to build a SPA which I think was laking some nuance and precision. Reading this article is not required to read this one. I'm writing this update because SPAs are very popular and I recently though more about …


Continue reading

JavaScript fatigue

Posted on 2020-05-31 in Programmation • Tagged with JavaScript

Today, I'd like to dig into something that has been bothering me lately: why I often feel tired of JavaScript (and even sometimes programming in general). I'm not alone in this, there's even a name for this JavaScript fatigue. Here I'll give my personal thoughts on this (and probably rant …


Continue reading

PWAs and Django

Posted on 2020-02-29 in Programmation • Tagged with Python, Django, PWA, JavaScript

In this article, I'll guide you to create a PWA with the Django framework. All the code for this project is available under my gitlab account. You will find in each sections links to the relevant commits to help you follow. If something is not clear or if you have …


Continue reading