Skip to content

Instantly share code, notes, and snippets.

Avatar
vibing

Quint Guvernator qguv

vibing
View GitHub Profile
@qguv
qguv / 0001-float-window.patch
Created February 4, 2023 18:56
glslviewer-git float window
View 0001-float-window.patch
From b54569d3510e0c35e8d3fe5207f68adea5fa1a4f Mon Sep 17 00:00:00 2001
From: Quint Guvernator <quint@guvernator.net>
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
View build.ninja
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
View zendo.py
#!/usr/bin/env python3
import collections
import functools
import itertools
import math
import primefac
import sys
tf_try_calls = []
@qguv
qguv / move_to_inbox.js
Created October 9, 2022 16:03
'Move to Inbox' in Basic HTML View in Gmail
View move_to_inbox.js
// ==UserScript==
// @name 'Move to Inbox' in Basic HTML View in Gmail
// @namespace https://quint.guvernator.net
// @version 0.1
// @description add an option to move emails to the inbox in the basic HTML view of Gmail
// @author qguv
// @match https://mail.google.com/mail/u/*/h/*/?*&s=*
// @exclude https://mail.google.com/mail/u/*/h/*/?*&s=i*
// @grant none
// ==/UserScript==
@qguv
qguv / standard_vegan_bowl.txt
Created September 12, 2022 17:42
Standard vegan bowl
View standard_vegan_bowl.txt
## ingredients
- a sweet potato
- some quinoa
- field greens (or mix)
- cherry tomatoes
- vegan battered chicken slices
- unsweetened vegan yoghurt
- cucumber (garnish, optional)
- pine nuts (optional but really healthy here)
@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.
View Roguelight_quiet.sh
#!/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
View crowd_counter.ipynb
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 July 28, 2022 00:25
Extract the most commonly used stickers from your Telegram chat history.
View get_stickers.py
#!/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/
View com.nextcloud.screenshots.location.plist
<?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 December 26, 2022 10:11
Visual Studio Code: Enable native Wayland support
View vscode-wayland.md

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: