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:
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.
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!
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:
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.
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.
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:
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*.
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/.