February 6, 2021

Calculating hashes in Python without Python

The law of the instrument tells us that we might not use the best tool for the job. In this post we show an example where Python is not the tool for the job. We created a simple script which adds the hash of a file in the filename, enable you to detect data degration for cold storage. Note that I only use Unix systems (Linux, Android and Chromebook). When creating the following script using Python, you would likely first read the file into memory and then calculate a hash, as seen in the following script: Read more

January 13, 2021

Analytical approach to career switching

The conventional road to a vocation is through an education. In this post I try to show an alternative way of pivoting to a different career without going back to school/university. Personally I had my fair share of pivoting early on. My education started with mechatronics, since I liked creating stuff as a kid and doing mechanics and electronics combined seemed like a good fit. After this education I was able to create machines, but to control them required software, which made me study computer engineering. Read more

December 26, 2020

DIY Parcel box

This article describes how to create your own parcel box. It was motivated by the fact that I found a package in my bicycle crate in front of my house when coming home after being away for a few weeks. I still wonder how many there have been there originally but might have been stolen. In line with my work, I tried to come up with a technical solution that prevents changing the human (delivery guy). Read more

November 19, 2020

Grafana Toml to environment variables

The following snippet creates environment variables from your Grafana toml. #!/bin/sh # Script writes to env file and shows JSON lines on stdout if [ -z "$2" ]; then echo "USAGE: $0 ./inputfile.toml ./output.env" fi TF=/tmp/temp-grafana-conf.toml echo "[default]" > $TF cat $1|sed 's #.*$ ' >> $TF > $2 while read l; do if `echo $l|grep -q '^#'`; then continue fi if `echo $l|grep -q '^\[.*\]$'`; then PREFIX=`echo $l|tr -d '\[\]'` continue fi if `echo $l|grep -q '='`; then NAME="GF_$PREFIX" NAME=$NAME"_`echo $l|awk '{print $1}'`" NAME=`echo $NAME|tr a-z\. Read more

December 28, 2019

Home automation through device detection using MAC address

There are multiple ways of controlling home automation. This blog introduces another sensor to the network; detecting if someone is home through testing if the MAC address is present on the L2 network. Ping to MAC address The basis for our script will be: sudo su apt install -y arp-scan arp-scan --destaddr=04:b1:67:aa:bb:cc \ --localnet \ --interface="`iw dev|grep -o wlan[0-9]|head -1`" \ | grep '1 responded' The last command tests if the hardware address of the interface (e. Read more

November 27, 2019

An introduction to coding: chat bot for MS teams

This guide creates a script that monitors the current open chat and responds with a message if a new message has been received. In our previous introduction to coding we looked at a structural approach to gradually become a programmer. But that guide required bash, which takes some initial setup on Windows (using WSL). This post only requires the Chrome browser and access to teams.microsoft.com. Step 00 preparation Open teams. Read more

September 30, 2019

An introduction to coding: converting excel (csv) to markdown table

So you know your way around your OS (operating system) a bit, you use your terminal/CLI (command line interface) more and more and want to start coding? This post explores how you can get on your way becoming a programmer during your normal desk job. CLI We encourage you to use a Unix CLI more and more, on Windows I would recommend WSL, on OSx, Linux and Chromebooks it comes pre-installed. Read more

September 28, 2019

DIY NAS Network Attached Storage from USB stick

This post shows how to use a USB stick/HDD in a Linux device as NAS or Network Attached Storage using Samba, the protocol available on Chromebooks and Windows devices. NAS servers allow the IT guy in the house/office to manage the backups for others. What we need is an USB stick/HDD and a device to insert it into. My router has the option, but I’ll show how to use a SoC (Raspberry pi) instead, since it’s a bit more complicated. Read more

August 31, 2019

How much allowance should our kid get?

When we believe and live in a society that embraces the concept meritocracy, we can look at the allowance of children in a different way. This post explains a model for determining the allowance based on performance, preparing kids for real life. Accumulation We first observe that there are two distinct ways of getting money in a welfare state that are comprehensible for children. Sponsored money for being a homo sapien: bijstandsuitkering (guaranteed allowance) Earned money through labor: salary We also note that concepts like tax systems, compounded interest, inflation etc. Read more

August 13, 2019

My guide to a new phone or laptop

This post details the hardware choices I make. For me, fungibility is an important aspect. I take pride in backing up my data and be able to wipe my phone and laptop everytime I cross a border of a country that wants to make a backup of my data. This way of working pushes me in the cloud and less on local devices, which in turn can be cheaper and more efficient (thus better battery life). Read more

Blog by lent.ink