Skip to content

Instantly share code, notes, and snippets.

View staernid's full-sized avatar

staernid staernid

View GitHub Profile
@staernid
staernid / .env
Last active July 24, 2025 10:50
Azerothcore-wotlk (with playerbots in my case) Docker Compose override file. This has lazytainer configured to automatically stop or start up your game server depending on if anyone is playing (or trying ot log in).
AC_DATA_DIR="/azerothcore/env/dist/data"
AC_LOGS_DIR="/azerothcore/env/dist/logs"
AC_LOGIN_DATABASE_INFO="lazytainer;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_auth"
AC_WORLD_DATABASE_INFO="lazytainer;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_world"
AC_CHARACTER_DATABASE_INFO="lazytainer;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_characters"
AC_PLAYERBOTS_DATABASE_INFO="lazytainer;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_playerbots"
@staernid
staernid / scdl
Last active January 26, 2024 13:30
run scdl from flyingrub in docker. Just add to path!
#!/bin/bash
# scdl runner that builds a whole container first
echo Running docker build first...
docker build --tag scdl - <<EOF
FROM alpine AS unzipper
WORKDIR /zip
RUN wget 'https://github.com/flyingrub/scdl/archive/refs/tags/v2.7.3.zip' && \
unzip 'v2.7.3.zip' && mv scdl-2.7.3 scdl
@staernid
staernid / list-manually-installed.sh
Created June 11, 2021 11:03
Lists Void Linux / voidlinux (xbps) packages that were manually installed (without trailing "-VERSION" suffix)
#! /bin/bash
while read -r package ; do
echo "${package%-*}"
done < <(xbps-query -lm)
@staernid
staernid / switch
Created March 11, 2021 12:03
USB Switch using usbip
#!/bin/bash
set -x
# This is a tool that emulates a usb switch by leveraging usbip
# The script is needed on two machines
# PC: 1 PC: 2
# ############### ##############
# # # -- ./switch --> # #
# # SERVER # # CLIENT #
#! /bin/bash
# Bash gumroad downloader based on a python script from user gatekeepr:
# https://gist.github.com/gatekeepr/97d6244dc074280b32f505443fbd7fe6
# Easily extendable with GNU Parallel! (if you have the download capacity :)
# TODO: Could use a fancy bar or download counter...
url="https://gumroad.com/d/a795646b9ddc4a496c6cab5e3fa179b5"
cookies_path="./cookies.txt"
download_path="./"
@staernid
staernid / create-pi.sh
Last active October 12, 2024 21:28
Void Linux on the Raspberry Pi - SD-card install script for Headless use! Only tested on Zero W
#!/bin/bash
# This makes a readily bootable Voidlinux SD-Card for the raspberrypi
# Sets up some configs, making the Pi connect to wifi and sshd
#
# First boot up takes a very long time (5+ mins even) on a Zero W. Really give it time.
# For remedy on subsequent booting see:
# https://wiki.voidlinux.org/Raspberry_Pi#Enabling_hardware_RNG_device
# SD-Card:
device="/dev/mmcblk0"
#! /bin/bash
url="https://gumroad.com/d/7b65cbcb5004935ce63bdd4cdd22ccba"
button_links=$(curl -c ./cookies-gumroad-com.txt -b ./cookies-gumroad-com.txt $url -L -Ss | grep '"download_click" data-url="' | awk '{print $7}' | cut -d '"' -f2)
# Possible replacement: button_links=$(curl -c ./cookies-gumroad-com.txt -b ./cookies-gumroad-com.txt $url -L -Ss | grep -oP '(?<=download_click" data-url=").*?(?=")')
for link in $button_links; do
curl --limit-rate 4000k -C - "gumroad.com$link" -L -c ./cookies-gumroad-com.txt -b ./cookies-gumroad-com.txt \