Skip to content

Instantly share code, notes, and snippets.

View qguv's full-sized avatar
vibing

Quint Guvernator qguv

vibing
View GitHub Profile
@qguv
qguv / vscode-wayland.md
Last active December 6, 2025 03:12
Visual Studio Code: Enable native Wayland support

Native wayland support is now working consistently for me in VSCode, giving much better text rendering. Unfortunately, it's still hidden behind some command-line flags.

By adding some files to /usr/local/*, you can ensure that VSCode always launches with these flags.

Adding launch flags to VSCode

Assuming that the VSCode launcher is /usr/bin/code-oss (as is the case in Arch):

  1. Create /usr/local/bin/code-oss with the following content:
@qguv
qguv / event_acronym_generator.py
Created November 18, 2025 23:19
Find good acronyms for keeping up with TODOs when booking events
#!/usr/bin/env python3
from pathlib import Path
from itertools import product
from sys import argv
def replacen(s, *args, **kwargs):
new = args.pop()
olds = args
@qguv
qguv / nl2.ksy
Created July 1, 2025 15:16
nanoloop two savefile spec (Kaitai format)
meta:
id: nl2
title: nanoloop two save file
file-extension:
- nl2
ks-version: 0.9
endian: be
seq:
- id: data_blocks
type: block
@qguv
qguv / default_bindings.xml
Created June 1, 2025 17:54
Risk of Rain 2 default controller bindings
<joystickMap>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;JoystickMap dataVersion="2" hardwareGuid="00000000-0000-0000-0000-000000000000" hardwareName="Unknown" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://guavaman.com/rewired http://guavaman.com/schemas/rewired/1.1/JoystickMap.xsd" xmlns="http://guavaman.com/rewired"&gt;&lt;sourceMapId&gt;0&lt;/sourceMapId&gt;&lt;categoryId&gt;0&lt;/categoryId&gt;&lt;layoutId&gt;0&lt;/layoutId&gt;&lt;name&gt;&lt;/name&gt;&lt;hardwareGuid&gt;d74a350e-fe8b-4e9e-bbcd-efff16d34115&lt;/hardwareGuid&gt;&lt;enabled&gt;false&lt;/enabled&gt;&lt;buttonMaps&gt;&lt;ActionElementMap&gt;&lt;actionCategoryId&gt;0&lt;/actionCategoryId&gt;&lt;actionId&gt;4&lt;/actionId&gt;&lt;elementType&gt;1&lt;/elementType&gt;&lt;elementIdentifierId&gt;6&lt;/elementIdentifierId&gt;&lt;axisRange&gt;0&lt;/axisRange&gt;&lt;invert&gt;false&lt;/invert&gt;&lt;axisContribution&gt;0&lt;/axisContribution&gt;&lt;keyboardKeyCode&gt;0&lt;/keyboardKeyCode&gt;&lt;modifierKey1&gt;0
#!/bin/sh
set -e
tr=tr
if hash gtr 2> /dev/null; then
tr=gtr
fi
if [ "$1" = -2 ]; then
shift
@qguv
qguv / build-cargo-tar.sh
Last active April 2, 2025 09:19
Build a cargo project from a tar archive and write the output executable to a given path
#!/bin/sh
set -e
source_path="${1:?missing first argument: tar archive of cargo project}"
dest_path="${2:?missing second argument: path of output executable}"
rm -rf __proj
mkdir __proj
tar --strip-components=1 -xf "$source_path" -C __proj
cd __proj
@qguv
qguv / extract_stereo.sh
Last active March 17, 2025 14:19
Extract stereo audio from multi-channel 4i4 patched screen recording (3/4 out to 3/4 in)
ffmpeg -i in.mov -c:v copy -af 'pan=2c|c0=c4|c1=c5' out.mov
@qguv
qguv / GMSE01.ini
Created October 23, 2020 23:42
Dolphin Emulator settings for Super Mario Sunshine (GameCube, NTSC, USA)
# Dolphin game-specific settings for: Super Mario Sunshine (GameCube, NTSC, USA)
# https://wiki.dolphin-emu.org/index.php?title=Super_Mario_Sunshine
[Core]
# Avoids crashing after long periods of play
SyncGPU = True
[Video_Enhancements]
@qguv
qguv / functional_python.py
Created February 26, 2014 15:06
Simple examples of reduce, map, filter, lambda, and unpacking in Python 2
#!/usr/bin/env python2
# Functional Python: reduce, map, filter, lambda, *unpacking
# REDUCE EXAMPLE
add = lambda *nums: reduce(lambda x, y: x + y, nums)
def also_add(*nums):
'''Does the same thing as the lambda expression above.'''
def add_two_numbers(x, y):
@qguv
qguv / internet_uccs.md
Last active March 4, 2024 17:14
Automatic WPA Supplicant Configuration for GNU/Linux

Get a hard-wired ethernet connection

Disable all other network daemons

This is just an example; disable and stop all active daemons.

sudo systemctl stop dhcpcd
sudo systemctl disable dhcpcd