Skip to content

Instantly share code, notes, and snippets.

View Razuuu's full-sized avatar
🏠
Working from home

Joshua Samenfink Razuuu

🏠
Working from home
  • Germany
  • 12:22 (UTC +01:00)
View GitHub Profile
@Razuuu
Razuuu / minecraft-systemd-service.md
Last active November 26, 2025 21:57
Dynamic systemd Minecraft server template with customizable java home, server jar and memory per instance.

This setup provides a multi-instance Minecraft server using systemd templates.

  1. Add user
adduser --disabled-password --gecos "" minecraft
  1. Create files

/usr/lib/systemd/system/[email protected]

@Razuuu
Razuuu / tar-max-compression.sh
Created November 19, 2025 18:01
tar max compression
tar cvf - /path/to/file | gzip -9 - > filename.tar.gz
@Razuuu
Razuuu / config.txt
Created November 9, 2025 17:49
Turn off LEDs on the Raspberry Pi 4B (Paste this at the end of the file)
> /boot/firmware/config.txt
# Disable the PWR LED
dtparam=pwr_led_trigger=none
dtparam=pwr_led_activelow=on
# Disable the Activity LED
dtparam=act_led_trigger=none
dtparam=act_led_activelow=off
@Razuuu
Razuuu / tar-progress-oneliner.sh
Created October 27, 2025 17:47
tar oneliner with progress bar
SELFOLDER="/foldername/" tar cf - ${SELFOLDER} -P | pv -s $(du -sb ${SELFOLDER} | awk '{print $1}') | gzip > ${SELFOLDER}.tar.gz
@Razuuu
Razuuu / domain.xml
Created October 22, 2025 21:14 — forked from Informatic/domain.xml
How to use Windows 10 OEM license in libvirt VM (<smbios mode='host' /> does not work as Windows seems to verify UUID; apparmor/security configuration changes may be needed)
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<!-- ... -->
<qemu:commandline>
<qemu:arg value='-acpitable'/>
<qemu:arg value='file=/some/path/slic.bin'/>
<qemu:arg value='-acpitable'/>
<qemu:arg value='file=/some/path/msdm.bin'/>
<qemu:arg value='-smbios'/>
<qemu:arg value='file=/some/path/smbios_type_0.bin'/>
<qemu:arg value='-smbios'/>
@Razuuu
Razuuu / postgresql-webinterface.md
Created August 18, 2025 21:06
PostgreSQL Webinterface

See: https://www.pgadmin.org/download/pgadmin-4-apt/

#
# Setup the repository
#

# Install the public key for the repository (if not done previously):
curl -fsS https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo gpg --dearmor -o /usr/share/keyrings/packages-pgadmin-org.gpg
@Razuuu
Razuuu / KodiStandaloneRaspberryPiOsLite.md
Created July 10, 2025 19:32 — forked from didi1357/KodiStandaloneRaspberryPiOsLite.md
Kodi Standalone on Raspberry Pi OS Lite 64Bit Debian 12 Bookworm

Kodi Standalone on Raspberry Pi OS Lite 64Bit Debian 12 Bookworm

This guide describes how to get Kodi running on Debian Bookworm based Raspberry Pi OS Lite 64Bit without having to run the full LXDE GUI of the desktop version.

It is based on this guide.

First, install kodi as usual with

apt install kodi

@Razuuu
Razuuu / update_root_hints.sh
Last active May 14, 2025 23:18 — forked from lyjacky11/update_root_hints.sh
Update root.hints file for bind9
#!/bin/bash
# Vars
HEREAMI="$(dirname "$(readlink -f "${0}")")"
URL="https://www.internic.net/domain/named.root"
FILE="/usr/share/dns/root.hints"
# Check if file is the same, otherwise override
if ! diff -q <(curl -s "${URL}") "${FILE}" > /dev/null 2>&1; then
# Download root.hints file
@Razuuu
Razuuu / create-dummy-file.sh
Created November 17, 2024 14:37
Create a 0 bytes dummy file
dd if=/dev/zero of=1GB.bin bs=1 count=0 seek=1GB
@Razuuu
Razuuu / search-string-in-folder.sh
Last active October 21, 2024 21:42
search for a string inside a folder
find . -type f -exec grep -H 'example string' {} \;
#or
grep -Rnw '.' -e 'example string'