Articles
RESTful API design
There are four main kind of operations when working with a database: Create, Read, Update and Delete (CRUD). However, databases are usually not exposed directly to the clients. Instead, those operations are performed by a server side application with a client-facing API. The most common type of APIs nowadays are based on HTTP. An HTTP API can be built with complete freedom. However, guidelines for best-practice HTTP API design have been created. An API following those guidlines is called a REST (or RESTful) API.
SSH keys
Using a key file can greatly increase security when connecting to a host via SSH. This article presents how to create such keys and configure hosts to use them.
Docker HTTP (insecure) registry
By default Docker refuses to push/pull from registries that are not served using HTTPS.
Anshin
I live by myself far away from my relatives, which can can make them worried if they don't hear about me for too long. To reassure them, I made a simple web application which displays my recent activity alongside a list of emergency contacts.
Kubernetes persistent volumes
Applications deployed on a Kubernetes cluster run inside containers. As a consequence, their file system is that of the container, which means that if the container is removed, the data it contained is lost.
Using v-for or v-if on multiple elements
Items to which <code>v-if</code> or <code>v-for</code> apply can be grouped inside <code><template></code> tags. For example:
Python list slicing
Here are a few useful features of Python when dealing with lists (Arrays):
Controlling a motor using an H bridge
A DC motor model can be as simple as: T = K * I where T is the torque provided by the motor, K the motor constant and I the current that flows through it. From this simple model, one can see that if the sign of the current changes, that of the torque also changes. Thus, changing the direction of rotation of a DC motor is a simple as reverting flow into it.
MQTThree
A simple framework using Three.js and MQTT to easily create digital twins
Gitlab CI dealing with credentials
GitLab can automatically dockerize applications using the appropriate CI configuration. However, for obvious security reasons, it is bad practice to include credentials in a git repository. Consequently, the CI pipeline is by default not in a position to include credentials in the dockerized application, which most likely prevents the latter from running as intended.