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 / Roguelight_quiet.sh
Last active July 21, 2022 17:04
Remove in-game background music from Roguelight.exe, producing a .zip containing a new .exe and its dependencies.
#!/bin/sh
set -e
exe="$1"
zip="$2"
re="/tmp/re/ResourcesExtract.exe"
function usage() {
printf 'Usage: %s EXE ZIP\n' "$0"
printf '%s\n' "Removes in-game background music from Roguelight.exe, producing a .zip containing a new .exe and its dependencies."
@qguv
qguv / crowd_counter.ipynb
Created July 18, 2022 09:13
Amsterdam crowd density API example
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@qguv
qguv / get_stickers.py
Last active January 6, 2024 14:01
Extract the most commonly used stickers from your Telegram chat history.
#!/usr/bin/env python3
'''
Extract the most commonly used stickers from your Telegram chat history as:
- a JSON obj mapping sticker paths to the number of times sent; or
- the above in text; or
- a simple webpage showing all the stickers.
'''
_epilog = '''\
To get your Telegram chat history:
@qguv
qguv / com.nextcloud.screenshots.location.plist
Last active June 29, 2022 10:15
Save macOS screenshots in ~/Pictures/Screenshots/YEAR/MONTH/
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.nextcloud.screenshots.location</string>
<key>ProgramArguments</key>
<array>
@qguv
qguv / vscode-wayland.md
Last active April 3, 2024 06:40
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:
// extended from example at:
// https://willmurphyscode.net/2018/04/25/fixing-a-simple-lifetime-error-in-rust/
pub struct SomeCollection<'a> {
strings: Vec<&'a str>,
}
impl<'a> SomeCollection<'a> {
pub fn new() -> Self {
SomeCollection {
@qguv
qguv / ed_keys.md
Created July 21, 2021 18:11
Elite Dangerous key bindings

Mouse

  • Reset mouse: Mouse4

Flight throttle

  • 75%: C

Flight landing overrides

  • Thrust forward: W
  • Thrust backward: S
@qguv
qguv / baghrir_recept.txt
Created January 14, 2021 17:09
Baghrir recipe (Dutch)
350 gr meel
150 gr griesmeel
Zakje bakpoeder
Zakje instant gist
800 ml lauw water
Snufje zout
Goed met elkaar mengen. Plaats t in n badje met lauw water en niet met gekookt water. Laat t rusten voor ongeveer 20 min.
Pan na iedere pannenkoek omspoelen met water
@qguv
qguv / basics.scm
Last active December 29, 2020 23:18
; this can be evaluated at https://inst.eecs.berkeley.edu/~cs61a/fa14/assets/interpreter/scheme.html
(define
(square x)
(* x x)
)
(define
(range start length)
(if
@qguv
qguv / template.sh
Created December 17, 2020 13:35
Simple template renderer in POSIX sh
#!/bin/sh
# see https://serverfault.com/a/699377 and https://serverfault.com/a/925072
PROG=$(basename $0)
usage() {
echo "${PROG} <template-file> [config-file]"
}
expand() {