Skip to content

Instantly share code, notes, and snippets.

@svend
svend / karabiner.json
Last active December 31, 2025 00:48
karabiner.json
{
"description": "Rebind modifier keys for UTM",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": [
"^com\\.utmapp\\.UTM$"
],
"type": "frontmost_application_if"
# allowedIPs = [ "0.0.0.0/0" "::/0" ]; # route all traffic through WG
allowedIPs = [
"10.0.0.0/24"
"fd00::/64"
];
endpoint = "10.10.0.238:51820";
publicKey = "Kd1JuRVmitgnwVfesMFB5z7E4saFoWSiZPzVuiafn1w=";
LY+Tj9RGYay6h1xRb44ksyo6oh0JvjXlJ3cTG8LK0hI=

After chaninging a GitHub repository's default from master to main, run locally:

git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a
@svend
svend / sparkle.py
Created December 3, 2017 07:56
Harper's sparkle game in Python
#!/usr/bin/env python3
MAX = 50
def get_sparkle():
"""Gets the sparkle number from the player"""
while True:
try:
n = int(input('What is the sparkle number? '))
@svend
svend / sparkle.sh
Created November 13, 2017 01:35
Harper's sparkle game
#!/usr/bin/env bash
echo "harper's sparkle game"
read -rp "What is the sparkle number? " sparkle_number
echo "The sparkle number is $sparkle_number"
current_number=1
while :; do