Skip to content

Instantly share code, notes, and snippets.

@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 February 18, 2025 18:05
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