Skip to content

Instantly share code, notes, and snippets.

@BenWiederhake
BenWiederhake / pulser.py
Created January 30, 2022 20:10
Annoying pulser that pulses annoyingly
#!/usr/bin/env python3
from PIL import Image
import math
import time
SIZE = (400, 300)
TOTAL_TIME = 40
// g++ -O2 -std=c++20 -o foo repro.cpp && ./foo
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct Vector {
~Vector() {}
char* data() {
if (m_outline)
return m_outline;
return reinterpret_cast<char*>(m_inline);
@BenWiederhake
BenWiederhake / words_allow_extra.lst
Created May 6, 2023 15:33
(Hopefully) Valid words in Serenity that don't appear in a dictionary
aaabf # Part of a commit
aarch
Aarch
ABCD
abefrnt # list of shortargs
abench
ABI
abrt
Absolutize
AcceptSocketConnections
@BenWiederhake
BenWiederhake / randombeeps.py
Created October 8, 2023 12:23
Random beeps, perhaps it does nothing against tinnitus
#!/usr/bin/env python3
# Usage: python3 randombeeps.py | aplay -f cd
import math
import random
import struct
import sys
MIN_FREQ_HERTZ = 100
@BenWiederhake
BenWiederhake / check-spellcheck.py
Created April 30, 2024 16:34
Find unnecessary spellcheck exclusions in uutils; run this from the top-level directory
#!/usr/bin/env python3
import re
import subprocess
RE_SPELLCHECK_DISABLE = re.compile("spell-checker:disable-\w+")
CACHED_FILES_STRING = None
def check_right_directory():