Skip to content

Instantly share code, notes, and snippets.

View bramtechs's full-sized avatar
🐺

brambasiel bramtechs

🐺
View GitHub Profile
@bramtechs
bramtechs / indexer.bash
Created July 19, 2023 12:20
Bash script that generates csv of file tree (path to file, size and md5 hash)
#!/bin/bash
RUN_DIR=$1
if [ -z "$1" ]; then
echo "Usage: $0 <directory of game distribution>"
exit 1
fi
echo Generating index of $RUN_DIR ...
pushd $RUN_DIR
@bramtechs
bramtechs / packager.mjs
Created May 27, 2023 09:42
Provide a zipped version of the client in the dist directory.
import { zip } from "zip-a-folder";
import fs from "fs";
const FOLDER = "./dist/client";
const ZIP_OUT = "./dist/client/packages/latest.zip";
async function run() {
// check if directory exists
if (!fs.existsSync(FOLDER)) {
throw new Error(`Directory ${dir} does not exist. Did you build the client?`);
@bramtechs
bramtechs / vfio.conf
Created March 29, 2023 17:10
Pass my nvme drive and NVIDIA GPU to vfio (desktop computer)
#/etc/modprobe.d/vfio.conf
# Pass nvme drive and NVIDIA GPU to vfio
softdep nouveau pre: vfio-pci
softdep snd_hda_intel pre: vfio-pci
softdep nvme pre: vfio-pci
options vfio-pci ids=10de:1f82,10de:10fa,c0a9:2263
@bramtechs
bramtechs / upgrade-debian-wsl.md
Last active May 10, 2024 20:21
Upgrade Debian 9, (current WSL) to Debian 12 (bookworm testing)

Upgrade Debian 9 (current WSL) to Debian 12 (bookworm testing)

Note: I do not maintain this gist anymore, but people report that it still works. Please check the comments for any revisions or extra things you should take into consideration.

As of writing, the Debian distro for WSL (Windows Subsystem for Linux) is quite old.

You can get more up-to-date package managers, text-editors and compilers by upgrading WSL to Debian 12 (current testing).

  • Root required
  • Use at your own risk, preferably on a fresh installation.