Articles

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.
GitLabTutorials

Kubectl pull new version of image without changes to manifest

When using kubectl apply using an already applied and unchanged manifest file, nothing happens on the Kubernetes cluster. However, deployments can be configured so as to always pull a new version image upon restart. This is achieved using the, <code>imagePullPolicy: Always</code> parameter:
TutorialsKubernetes

Mongoose bulk update upsert

MongoDB's upsert option enables the creation of a new document if the query of an update operationdoesn't match any existing document. Basically, an update command with upsert creates a document if it does notexist already, and update it otherwise.
MongooseMongoDBTutorials

Docker restart container when docker restarts

Simply add the following flag when using docker run
TutorialsDocker

Gitlab CI commands for TF serving

This is an example .gitlab-ci.yml file which can be used to containerize and deploy a tensorflow model
TensorFlowKubernetesGitLabDocker

Kubectl create deplpoyment and service at same time

Simply add entries for both the deployment and the service in the same manifest, separeted by ---
TutorialsKubernetes

Serving a Keras model using Tensorflow serving and Docker

A Keras model can be created in various ways, for example using the <a href="https://keras.io/getting-started/sequential-model-guide/" rel="noopener noreferrer nofollow">sequential model</a>:
AI / MLTensorFlowKerasDocker

Arduino button debounce function

Arduino button debounce function thumbnail
Physical buttons and switches do not switch between open and close position instantly and perfectly. Instead, they have a tendency to "bounce" between the two states before settling on one. This issue is thoroughly described in circuitdigest's excellent article. Consequently, when using such components with, for example, an Arduino microcontroller, a proper debouncing algorithm must be implemented.
ArduinoElectronics

Mongoose bulkWrite upsert

Here is a code snippet for a bulk update with upsert using Mongoose:
MongoDBMongooseNode.js

Controlling a motor using an H bridge

Controlling a motor using an H bridge thumbnail
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.
TutorialsMechatronicsElectronicsMotor