August 14, 2022

I always need to set critical environment variables on my Bash (API tokens), and of course, it’s a very bad idea to store them on .bashrc. I found a simple way to store them in an encrypted file loading it only when necessary:

Post cover
August 13, 2022

A few days ago, my daughter has deleted by mistake some photos on her camera. It has been 10 years at least since I recovered deleted files last time, so I had to find out how to approach the problem in 2022 with Kali Linux.

Post cover
July 13, 2022

I have a “landline” VoIP number, used by my parents to reach me when my phone is turned off. Apparently, landlines number are preferred by spammers, so I wrote a simple firewall zero-trust configuration for my FRITZ!

Post cover
August 11, 2021

The following scripts allow cleaning a Docker host, and stopping and deleting containers and images. Stop all containers: #!/bin/bash CONTAINERS=$(docker ps -a | tail -n+2 | cut -d" " -f1) if [ "$CONTAINERS" == "" ]; then exit fi docker stop $CONTAINERS Stop and delete all containers:

Post cover
August 10, 2021

To debug a container or to access it, sometimes I need to override the entry point for a specific image: docker run -it --entrypoint /bin/sh [docker_image]

Post cover
March 07, 2021

Sometimes we realize we committed something that should remain confidential. Or maybe we are ready to publish our open source project and we don’t want to publish the entire history too.

Post cover
January 03, 2021

To properly configure a Pi Zero W headless (without monitor and keyboard), burn a Raspberry OS (Raspbian) image into a SD card. Insert the SD card again and browse the first partition where config.

Post cover
August 14, 2020

On some Ansible designs, I need to use a bastion host to log in to remote servers. We can configure it in the following way: on ansible.cfg file: [defaults] timeout = 25 gathering = smart # utile ma non essenziale [ssh_connection] #ssh_args = -o ControlMaster=auto -o ControlPersist=600s ssh_args = -o ControlMaster=auto -o ControlPersist=600s -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=nocontrol_path = %(directory)s/%%h-%%r pipelining = True on the inventory file:

Post cover
August 13, 2020

On large Linux Debian installations, I usually configure an APT proxy to optimize upgrades. I’m used to configuring APT-Cached NG in the following way: on /etc/apt-cacher-ng/acng.conf file: CacheDir: /proxydata/cache/apt-cacher-ng LogDir: /var/log/apt-cacher-ng SupportDir: /usr/lib/apt-cacher-ng Port:3142 Remap-debrep: file:deb_mirror*.

Post cover
August 07, 2020

On my home Linux box, I implemented Let’s Encrypt to properly manage secure HTTPs connections. To properly configure it we need to: Make the directory /.well-known reachable via HTTP and mapped locally under /var/www/html/.

Post cover