SD Card Backup and Restore

💊 Quick Pill: SD Card Backup and Restore ℹ️Info Use case: Backup Raspberry Pi SD cards, bootable USB drives, or any block device with compression. 🔄 Backup SD Card Create a compressed backup of your SD card: ...

October 5, 2025 · 3 min · 512 words · Manzolo

Windows System Repair and Maintenance

💊 Quick Pill: Windows System Repair ℹ️Info Use case: Fix corrupted Windows system files, repair Windows Update issues, resolve DLL errors, and restore system health. 🧭 The order is the whole trick Almost every “Windows repair” script on the internet gets this backwards, and so did the first version of this page. The correct order is: ...

October 5, 2025 · 10 min · 2101 words · Manzolo

LUKS Encrypted Container

💊 Quick Pill: LUKS Encrypted Container ℹ️Info Use case: Create encrypted file containers for secure backup storage, sensitive documents, or portable encrypted volumes. Works like a virtual encrypted disk. 🔐 Quick Setup (5 minutes) 1. Install Required Tools sudo apt install cryptsetup 2. Create Encrypted Container # Create a 10GB empty file (fast allocation) fallocate -l 10G BackupCrypt.img # Initialize LUKS encryption (you'll set a password) sudo cryptsetup luksFormat BackupCrypt.img # Open the encrypted container sudo cryptsetup open BackupCrypt.img backup_crypt # Create filesystem inside sudo mkfs.ext4 /dev/mapper/backup_crypt # Mount it sudo mkdir -p /mnt/encrypted sudo mount /dev/mapper/backup_crypt /mnt/encrypted # Set permissions (optional - for your user) sudo chown $USER:$USER /mnt/encrypted 3. Use Your Encrypted Storage # Copy files cp -r ~/Documents/sensitive/ /mnt/encrypted/ # Work with files normally echo "Secret data" > /mnt/encrypted/secret.txt 4. Close Encrypted Container # Unmount sudo umount /mnt/encrypted # Close LUKS container sudo cryptsetup close backup_crypt ✅Success Done! Your data is now encrypted. Without the password, the file looks like random data. 🔄 Daily Usage Open and Mount # Open with password prompt sudo cryptsetup open BackupCrypt.img backup_crypt # Mount sudo mount /dev/mapper/backup_crypt /mnt/encrypted Close and Lock # Always unmount first sudo umount /mnt/encrypted # Then close sudo cryptsetup close backup_crypt 📋 Command Reference Create Container Command Purpose Notes fallocate -l SIZE file.img Create empty file (fast) Sizes: 1G, 10G, 100G, etc. dd if=/dev/zero of=file.img bs=1M count=10240 Create file (slower, more secure) Overwrites with zeros cryptsetup luksFormat file.img Initialize LUKS encryption Sets password Open/Close Command Purpose cryptsetup open file.img name Open encrypted container cryptsetup close name Close encrypted container cryptsetup status name Check if container is open Filesystem Command Purpose mkfs.ext4 /dev/mapper/name Create ext4 filesystem mkfs.xfs /dev/mapper/name Create XFS filesystem mkfs.btrfs /dev/mapper/name Create Btrfs filesystem 💡 Pro Tips Create container with dd (more secure, slower) Use dd instead of fallocate for better security - overwrites the file with zeros: ...

October 5, 2025 · 6 min · 1190 words · Manzolo

Batch Image Optimization

💊 Quick Pill: Batch Image Optimization ℹ️Info Use case: Optimize hundreds of JPEG images for websites, reduce storage space, speed up page loading, or prepare photos for sharing. 🚀 Quick Setup Install Required Tools # Ubuntu/Debian sudo apt install jpegoptim optipng # Fedora/RHEL sudo dnf install jpegoptim optipng # macOS (with Homebrew) brew install jpegoptim optipng 📸 Basic Image Optimization Optimize All JPEGs in Folder Save as optimize_images.sh: ...

October 5, 2025 · 8 min · 1628 words · Manzolo

QEMU/VirtualBox Disk Resize

💊 Quick Pill: QEMU/VirtualBox Disk Resize ℹ️Info Use case: Expand virtual machine disk when running out of space. Works with QEMU raw images, VirtualBox VDI/VHD, and similar formats. 🚀 Complete Resize Process ⚠️Warning ⚠️ Critical: Always backup your VM disk before resizing! Step-by-Step Guide # 1. Shutdown your VM first! # 2. Resize the disk image file qemu-img resize -f raw Ubuntu.vhd 200G # 3. Load NBD kernel module sudo modprobe nbd # 4. Connect disk as network block device sudo qemu-nbd --connect=/dev/nbd0 -f raw Ubuntu.vhd # 5. Expand the partition sudo parted /dev/nbd0 Inside parted: ...

October 5, 2025 · 9 min · 1707 words · Manzolo

Encrypted LVM Disk Resize (LUKS + LVM)

💊 Quick Pill: Encrypted LVM Disk Resize ℹ️Info Use case: Expand encrypted Ubuntu/Debian VMs that use LUKS encryption + LVM. Common in full-disk encryption setups. 🔐 Complete Resize Process (Encrypted + LVM) ⚠️Warning ⚠️ Critical: ...

October 5, 2025 · 10 min · 2072 words · Manzolo