Skip to content

Instantly share code, notes, and snippets.

View MrDwarf7's full-sized avatar
๐Ÿ‘€
Open to freelance work & collaborations!

Blake B. MrDwarf7

๐Ÿ‘€
Open to freelance work & collaborations!
  • East-Coast, Aus
  • 13:40 (UTC +11:00)
View GitHub Profile
@MrDwarf7
MrDwarf7 / rr-with-rust.md
Created February 28, 2026 04:41 — forked from spacejam/rr-with-rust.md
using rr with rust

using rust with rr

rr is a great debugging tool. it records a trace of a program's execution, as well as the results of any syscalls it executes, so that you can "rewind" while you debug, and get deterministic forward and reverse instrumented playback. it works with rust, but by default if you try it out, it could be pretty ugly when you inspect variables. if this bothers you, configure gdb to use a rust pretty-printer

rr is probably in your system's package manager.

usage

@MrDwarf7
MrDwarf7 / README.md
Created February 4, 2026 12:25 — forked from leomp12/README.md
Syslinux (Arch) UEFI direct secure boot
@MrDwarf7
MrDwarf7 / archinstall.md
Created February 3, 2026 12:18 — forked from ungeskriptet/archinstall.md
My personal Arch Linux installation guide for an UEFI install with UKI and optionally secure boot (archinstall.md)

David's personal Arch Linux installation guide

Note

This guide is meant for my personal use. If you're installing Arch Linux for the first time, please follow the official installation guide instead.

1. Flashing the ISO

  1. Download the latest ISO file from https://ftp.halifax.rwth-aachen.de/archlinux/iso/latest/archlinux-x86_64.iso
    • $ curl https://ftp.halifax.rwth-aachen.de/archlinux/iso/latest/archlinux-x86_64.iso -O
  2. Flash the ISO
    • $ cat archlinux-x86_64.iso | sudo tee /dev/sdX > /dev/null
  3. Verify the flashed image on the USB drive (optional)
@MrDwarf7
MrDwarf7 / open_source_licenses.md
Created December 31, 2025 04:44 — forked from nicolasdao/open_source_licenses.md
What you need to know to choose an open source license.
@MrDwarf7
MrDwarf7 / 01-nvidia.conf
Created October 13, 2025 05:01 — forked from denji/01-nvidia.conf
/etc/modprobe.d/nvidia.conf
# /etc/modprobe.d/nvidia.conf
# NVIDIA Linux modprobe.d Configuration
#
# Memory and Performance Enhancements:
#
# - NVreg_UsePageAttributeTable=1 (Default: 0)
# Activates the Page Attribute Table (PAT) for improved memory management.
# PAT creates a partition table at a fixed register-mapped address, potentially enhancing CPU performance.
#
@MrDwarf7
MrDwarf7 / store.rs
Created September 29, 2025 07:35 — forked from cetra3/store.rs
use std::sync::RwLock;
use std::sync::RwLockReadGuard;
#[allow(dead_code)]
pub struct Store<T, U> {
name: String,
state: RwLock<T>,
listeners: RwLock<Vec<fn(&T, &U)>>,
reducer: fn(&mut T, &U),
}
import argparse
import subprocess
import sys
import os
def run_cmd(cmd, check=True):
"""
Helper to run a command using subprocess.
If check=True, raises an exception on nonzero return.
#!/usr/bin/env python3
"""
Automates creation of a baseline Btrfs layout on a given device/partition.
- Assumes the partition is already wiped or otherwise ready.
- Creates a Btrfs filesystem with a label.
- Creates subvolumes: @, @boot, @swap, @snapshots, @var, @home, @tmp
- Mounts @ at /mnt, then mounts the others to their respective subdirectories.
- NOTE: You must run this script with sudo (or as root).
@MrDwarf7
MrDwarf7 / CompactWSL.bat
Created November 18, 2024 01:53 — forked from Csqhi515/CompactWSL.bat
Script to help compact WSL and vhdx.
@echo off
net session >nul 2>&1
if %errorlevel% neq 0 (
echo Requesting administrative privileges...
powershell -Command "Start-Process '%~f0' -Verb RunAs"
exit /b
)
wsl sudo fstrim --all; echo "Exit status: $?";