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 / 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 / ue5_sav.ksy
Created January 14, 2024 21:57
Parser for Unity Engine 5 save files (tested on Pseudoregalia saves)
meta:
id: pseudoregalia_save
endian: le
seq:
- id: magic
contents: GVAS
- id: unknown1
size: 22
- id: version
type: strn
@qguv
qguv / filimin_fix_gradient.js
Created November 19, 2023 14:24
Filimin fix gradient (User script)
// ==UserScript==
// @name Filimin fix gradient
// @version 1
// @include https://manager.filimin.com/products/*/edit
// ==/UserScript==
function make_stops(start_deg, end_deg, n_stops) {
const stops = [];
const span_deg = (
end_deg > start_deg
@qguv
qguv / pancakes.md
Created August 12, 2023 22:09
Fluffy vegan pancakes

Fluffy vegan pancakes

Prep: 15 minutes. Cooking: a few minutes per round. One batch serves about 3 people.

Tools

  • large mixing bowl
  • griddle (alternatively: several flat frying pans)
  • large, thin spatula
  • soup ladle
@qguv
qguv / configuration.yaml
Last active May 5, 2023 18:19
get data from a sensor.community (airRohr) sensor into Home Assistant locally
rest: !include_dir_list rest/
@qguv
qguv / static-filters.txt
Last active May 2, 2023 12:54
uBlock Origin static filters
! to keep your filters updated, import this list as:
! https://gist.githubusercontent.com/qguv/0b1def9db429a4caf6a97fd7b48b52b2/raw/static-filters.txt
! 2021-01-18 https://stackoverflow.com
! accessibility: remove dark rabbit-hole distraction links
! to update:
! 1. visit https://stackexchange.com/sites?view=list
! 2. open devtools (F12)
! 3. choose the console tab
! 4. paste the following (without the ! at the beginning)
@qguv
qguv / 0001-float-window.patch
Created February 4, 2023 18:56
glslviewer-git float window
From b54569d3510e0c35e8d3fe5207f68adea5fa1a4f Mon Sep 17 00:00:00 2001
From: Quint Guvernator <[email protected]>
Date: Sat, 4 Feb 2023 19:47:38 +0100
Subject: [PATCH] float window
---
src/window.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/window.cpp b/src/window.cpp
@qguv
qguv / build.ninja
Created February 3, 2023 18:08
build a C binary step-by-step
libs = -lc
rule compile
command = gcc -Wall -Werror -Wpedantic -S -o $out $in
rule assemble
command = gcc -c -o $out $in
rule link
command = gcc $libs -o $out $in
@qguv
qguv / zendo.py
Last active November 27, 2022 15:46
#!/usr/bin/env python3
import collections
import functools
import itertools
import math
import primefac
import sys
tf_try_calls = []