Skip to content

Instantly share code, notes, and snippets.

@tbr
tbr / show_d2r_map_seed.sh
Created November 9, 2024 15:01
Show Diablo II Resurrected Map Seed
#!/bin/bash
D2S_FILE=$1
printf "Map seed: %d\n" 0x$(hexdump -n 4 -s 171 -e '4/4 "%08X"' "${D2S_FILE}")
@tbr
tbr / tbr_pcie_pt
Last active September 5, 2023 17:05
Proxmox PCIe passthru with vfio-pci by exact device address (rather than per complete kernel module and VID/DEV)
#!/bin/sh
# Place in /etc/initramfs-tools/scripts/init-top (+x)
#
# This way of PCIe passthru allows for example to select a single NIC
# for a VM, while allowing other NICs to be still used by Proxmox.
#
# In my case, to passthru one SFP+ slot of a dual NIC card.
#
PREREQ=""
prereqs()