A randomSeed(analogRead(0)) in Arduino initializes the pseudo-random number generator that reads the random analog noise from an unconnected analog pin 0 and floats to relatively random values between 0 and 1023. This shuffles the random() number generator each time you start the Arduino sketch. In this note i will show the examples of how to […]
Minikube is a single-node Kubernetes cluster that can be installed on macOS, Linux and Windows. By default, it starts with 2 CPUs and 2GB of memory, that may not be enough for experiments with some heavy projects. This note describes 3 easy ways to start the Minikube with more memory and CPUs.
A USB Keyboard function in Arduino can be used to send keystrokes to an attached computer. Unfortunately this capability is limited to Arduino boards with the ATmega32u4 microchip i.e. Arduino Leonardo, Arduino Micro and Arduino-compatible Pro Micro (though the last one is really cheap). Below you will find some code snippets with the examples of […]
Let’s say you have connected to your computer some human interface device (HID) that can simulate key presses (e.g. Arduino with a button) and you want to do some debug. If you wonder how to capture a keystroke in Windows and detect which key has been pressed, this can be easily done from the PowerShell.
The .htaccess file is a configuration file for the Apache web server, that can be used to redirect requests from specific IP addresses to another resources. In this short note i will show how to redirect requests from one or several IP addresses via .htaccess file to a specific web page or another website.
The .htaccess file is a configuration file for the Apache web server, that can be used to restrict access to a web-site from a specific IP or a range of IP addresses. In this note i will show how to deny access from one or several IP addresses via .htaccess file and how to block […]
Application logs can be retrieved from a Pod in Kubernetes using kubectl command. In this note i will show how to get logs from a running Pod (including all replicas) and a previously crashed Pod. I will also show how to tail and follow logs from a Pod using kubectl command.
Artifactory has a REST API and an AQL (Artifactory Query Language) that can be used to get a list of all artifacts in a repository from the command line. In this note i will show how to list artifacts in a repository in Artifactory through the REST API using cURL and how to get the […]
Artifactory has a REST API that can be used to get a list of minimal repository details for all repositories from the command line. In this note i will show how to list repositories in Artifactory through the REST API using cURL and how to filter repositories by repository and/or package type.
A Deployment in Kubernetes is the process of providing declarative updates to Pods. It allows to declare the desired state in the manifest (YAML) file, and the controller will change the current state to the declared state. Deployments can scale the number of replica Pods, enable rollout of updated code in a controlled manner, or […]