Skip to content

Instantly share code, notes, and snippets.

View simonmicro's full-sized avatar
💻
Destroys the universe

simonmicro

💻
Destroys the universe
View GitHub Profile
@simonmicro
simonmicro / disable_firefox_pocket.py
Created December 2, 2022 14:08
Disable Firefox Pocket on Linux
#!/usr/bin/env python
import os
script = '''user_pref("extensions.pocket.enabled", false);
user_pref("extensions.pocket.api", "0.0.0.0");
user_pref("extensions.pocket.loggedOutVariant", "");
user_pref("extensions.pocket.oAuthConsumerKey", "");
user_pref("extensions.pocket.onSaveRecs", false);
user_pref("extensions.pocket.onSaveRecs.locales", "");
user_pref("extensions.pocket.showHome", false);
@simonmicro
simonmicro / output.txt
Last active July 12, 2023 10:04
rfm69 debug code to show spi timing issues
Finished dev [unoptimized + debuginfo] target(s) in 2.27s
Running `target/debug/test_rfm69`
-> [175, 170]
-> [47, 0]
<- [25]
<- [25]
tx_buffer: [47, 0]
rx_buffer: [25, 170]
-> [47]
tx_buffer: [0]
@simonmicro
simonmicro / dll.py
Last active October 10, 2024 15:18
Discord Launcher Launcher
#!/usr/bin/env python3
import subprocess, sys, os, re, shutil, time, urllib.request, tempfile
from select import select
'''
Discord Launcher Launcher
...because Discord cannot be bothered to not manually force-update all the time. Fuck you.
Yes, I'm pissed and lazy, so I'll just use os.system() calls directly.
@simonmicro
simonmicro / serialize_path_as_configmap.py
Created January 21, 2025 21:50
A script to serialize a given path as configmaps directly into kubectl and print the needed volume-mounts as YAML
import os, re, sys, subprocess, hashlib
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--volume', type=str, required=True, help='Name of volume and target YAML path')
parser.add_argument('--dir', type=str, required=True, help='Which path sould be serialized?')
parser.add_argument('--mountPath', type=str, required=True, help='Where should the serialized data go?')
parser.add_argument('--individual', action='store_true', help='Create one configmap per file, may bypasses configmap size limitations')
args = parser.parse_args()