Skip to content

Instantly share code, notes, and snippets.

View martin-braun's full-sized avatar
♠️

Martin Braun martin-braun

♠️
View GitHub Profile
@martin-braun
martin-braun / 8vim2txt.py
Last active June 18, 2023 04:14
8vim - DE Regular German: kjoetom's time moves (MB h4cker edition) DE60/EN40 Extended
#!/usr/bin/env python3
from fileinput import input as fileinput
from xml.etree import ElementTree
root = ElementTree.fromstring("".join(list(fileinput())))
for keyboardAction in root.findall('.//keyboardAction'):
keyboardActionType = keyboardAction.find('keyboardActionType')
movementSequence = keyboardAction.find('movementSequence')
@martin-braun
martin-braun / .stglobalignore
Last active June 30, 2023 03:37 — forked from jult/.stglobalignore
syncthing ignore file(s) .stglobalignore and .stignore
// .stglobalignore
// These prevent SyncThing from trying to sync data that's locked, constantly changing, going to be thrown out, unimportant, etc.
// Lots of conflicts/issues disappeared using these ignores, but do check to prevent major disappointment!
// *.log and *cache* are in there, just so you know.. but firefox' startupCache and offlineCache will be synced.
// Decided to stop categorizing these. Sorting them Lexicographically from now on. Ignores are case sensitive.
$RECYCLE.BIN
$WINDOWS.~BT
*.!Sync
@martin-braun
martin-braun / ldwallpaper.inc
Last active January 25, 2024 02:29
macOS - Create a "light and dark" wallpaper
ldwallpaper() {
if [ $# -lt 3 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
echo "Creates a light and dark wallpaper for macOS."
echo "Usage: ldwallpaper [-h] [--help] light_image dark_image out_heic"
echo ""
return 129
fi
command -v "exiv2" >/dev/null 2>&1 || { echo "exiv2 is not installed." >&2; return 1; }
command -v "heif-enc" >/dev/null 2>&1 || { echo "libheif is not installed." >&2; return 1; }
test -s "$1" || { echo "Light image does not exist." >&2; return 1; }
@martin-braun
martin-braun / !jrpc.md
Last active March 10, 2024 08:29
jrpc - Simple CLI tool for testing output from JSON RPC 2.0 services

JSON RPC CLI test tool

Usage

Usage: jrpc [OPTIONS]
Simple CLI tool for testing output from JSON RPC 2.0 services.

OPTIONS
  -V,   --version                 Prints the version of this script.
@martin-braun
martin-braun / !vs.md
Last active March 10, 2024 14:03
vs - Git Vendor Sources - A POSIX compliant Unix tool to manage third-party git sources

Git Vendor Sources

Usage

Usage: vs [COMMAND] [REPO] [OPTIONS]
Adds, updates or deletes git source files of third party vendors in the local source storage at $HOME/.sources/.vendor.
This tool is meant to clone third party sources to compile or use without further modification.
It will try to checkout the latest tag and fallback to the latest branch, unless a prefered branch/tag is given.
If you want to load a workspace, consider forking and cloning using the normal git utility instead.