Skip to content

Instantly share code, notes, and snippets.

@avengerx
avengerx / mass-normalize.sh
Last active November 9, 2025 04:13
Bash script to normalize audio from files using the `ffmpeg` tool
#!/bin/bash
mp3gain="/cygdrive/a/apps/mp3gain/mp3gain.exe"
id3="/cygdrive/a/apps/id3/id3.exe"
concurrent_jobs=4
if [ -z "${1}" ]; then
echo "usage: ${0} <directory> [<directory> ...]"
exit 1
fi
@avengerx
avengerx / iis-log-flusher.sh
Created November 14, 2024 11:57
Simple shell script to help flushing IIS logs on Windows/cygwin
#!/bin/bash
if ! net session > /dev/null 2>&1; then
echo "This tool must be run under Administrator privileges."
exit 1
fi
function flush() {
netsh http flush logbuffer
}
@avengerx
avengerx / mkscsjail.sh
Created March 15, 2023 20:59
Script to generate a very limited `chroot()` jail with SCS's ATS or ETS2 dedicated server, optionally binding to specific CPUs and IP
#!/bin/bash
runner_user=steam_runner
updater_user=steam_updater
usercachefile="/tmp/steamusercache.dat"
jaildir="./scsjail"
atsjaildir="atsd"
etsjaildir="ets2d"
@avengerx
avengerx / pdnreg.bat
Last active November 24, 2025 10:42
Add context menu 'Edit with Paint.NET' for supported file extensions (system-wide or per-user)
@ECHO OFF
setlocal EnableDelayedExpansion
set uninstall=no
set classkey=HKEY_CLASSES_ROOT
if [%1]==[uninstall] set uninstall=yes
net session > nul 2>&1
if %ERRORLEVEL% NEQ 0 (
echo Setting up for current user ^(run as Administrator for system-wide change^).
set classkey=HKEY_CURRENT_USER\Software\Classes