Posts

Automatically Fix Song Metadata and Filenames on Linux with Beets

 🎵 Automatically Fix Song Metadata and Filenames on Linux with Beets Tired of sorting through unknown MP3s with cryptic filenames like Track01.mp3? Sick of missing album info, incorrect genres, and zero cover art? Here's a clean way to batch-fix your music collection with open source tools — no manual editing required. ✅ What You’ll Use beets — the core tool that organizes, renames, and tags your music by matching against the MusicBrainz database. libchromaprint-tools — provides fpcalc, which generates audio fingerprints to identify unlabeled tracks. ffmpeg (optional) — used by beets for transcoding or embedded cover art processing. 🔧 Installation sudo apt update sudo apt install beets libchromaprint-tools ffmpeg 🚀 One Command to Organize It All beet import /path/to/your/music/ Beets will: Fingerprint each file Query MusicBrainz for metadata Rename files (e.g., Artist - Title.mp3) Write correct ID3/metadata tag Optionally move files into organized folders 📁 Example Output Your ...

yt-dlp flakes and demands a login

 # If yt-dlp gives login/CAPTCHA error, run the following: python3 -m pip install --upgrade --force-reinstall yt-dlp python3 -m pip install --upgrade cffi sudo apt install python3-cffi yt-dlp --cookies-from-browser chrome "VIDEO_URL_HERE"

How to Sync an iPod Touch (iOS 9.3.5) with macOS 10.13 and iTunes 12.8.3.1

Last tested: May 2025 | Hardware: iPod Touch 5th Gen + MacBook Pro 17" (2010) If you're trying to get your old iPod Touch to sync with your Mac running macOS High Sierra (10.13), you might run into a frustrating "Ask Apple" message or find the iPod icon greyed out in iTunes. Here's how to fix it. ✅ Prerequisites macOS 10.13 with iTunes 12.8.3.1 iPod Touch 5th gen running iOS 9.3.5 USB cable (original or good quality third-party) 🧩 Fix Steps 1. Clear device pairing lock In Terminal , run: sudo rm -rf /var/db/lockdown/* This clears old pairing records between macOS and the iPod. 2. Reset trust on iPod On your iPod: Go to Settings → General → Reset → Reset Location & Privacy Then reboot it: Hold Home + Power until the Apple logo appears. 3. Reconnect and trust Plug the iPod back in. When prompted, tap “Trust” on the iPod screen. 4. Fix stuck iTunes connection (if needed) If iTunes still refuses to connect: Res...

how to tack videos together

  #!/bin/bash rm -f list.txt for f in *.mp4; do   echo "file '$f'" >> list.txt done ffmpeg -f concat -safe 0 -i list.txt -c copy output.mp4

Basic docker commands

# Create a directory structure mkdir inventory_app cd inventory_app # Create app.py, requirements.txt, and Dockerfile touch app.py requirements.txt Dockerfile # Build the Docker image using the standard Python 3.11 image docker build -t inventory-app:full . # Display Docker images docker images # Rewrite the Dockerfile to use the lightweight Python 3.11-slim image # (Edit Dockerfile content accordingly) # Build the Docker image using the slim image docker build -t inventory-app:slim . # Display Docker images again docker images https://www.kdnuggets.com/how-to-create-minimal-docker-images-for-python-applications

script to show all files with disk usage sizes

Normally to get the disk usage of a folder you use get properties on the rightclick or similar. However there are hidden files starting with . in their name that you can get info on, only in the terminal, using the  du -sh  command. If you have hundreds of them (which you do!) this becomes tedious. The following script gives you a directory listing with the files all indicated in file sizes and highlights on files of megabytes or gigabytes in size.  #!/bin/bash # Set Internal Field Separator to handle spaces in filenames IFS=$'\n' # Loop through all files and directories for i in $(/bin/ls -A); do        size=$(du -sh "$i" | awk '{print $1}')           # Apply colors: bold for MB, bright bold for GB      case "$size" in          *M) color="\e[1m" ;;         # Bold for Megabytes          *G) color="\e[1;97m" ;;      # Br...

gnome shell dock goes blank

Sometimes the Gnome Shell dock (application launcher strip) goes blank. To get it back without logging out and back in: Press Alt + F2 Type r Press Enter This will restart GNOME Shell while keeping your applications running. To do this in a shell script: #!/bin/bash dbus-send --type=method_call --dest=org.gnome.Shell /org/gnome/Shell org.gnome.Shell.Eval string:'global.reexec_self()'