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 / !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.
@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 / 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 / .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 / 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 / install_node_suite.sh
Created February 23, 2023 18:40
Find recommend NPM version for current node version
#!/usr/bin/env sh
# TODO: Install nodejs
read npmv < <(echo $(node -e "fetch('https://nodejs.org/dist/index.json').then(r=>r.json()).then(e=>console.info(e.filter(a=>a.version=='$(node -v)')[0].npm))"))
# TODO: Install npm version $npmv
@martin-braun
martin-braun / curl_wget_test.sh
Last active January 8, 2023 12:01
curl_wget_test.sh
#!/usr/bin/env bash
hello() {
echo Hello World!
}
echo It worked!
echo ''
echo Arguments: $@
@martin-braun
martin-braun / bootstrap.model.wrapper.js
Created February 25, 2022 17:16
bootstrap.model.wrapper.js
window.showBSModal = function self(options) {
var options = $.extend({
title : '',
body : '',
remote : false,
backdrop : 'static',
size : false,
onShow : false,
onHide : false,
@martin-braun
martin-braun / 00default-release
Created February 21, 2022 22:19 — forked from khimaros/00default-release
debian testing with automatic security updates from unstable
APT::Default-Release "testing";
@martin-braun
martin-braun / xcloner-ea366.log
Last active November 26, 2021 17:39
xcloner-log
This file has been truncated, but you can view the full file.
[2021-11-21 02:30:37] xcloner_scheduler.INFO: New schedule hash is -a7718 [] []
[2021-11-21 02:30:37] xcloner_scheduler.INFO: Starting backup profile 'Tägliches Backup' ["CRON"] []
[2021-11-21 02:30:37] xcloner_file_system.INFO: Starting the filesystem scanner on root folder /homepages/25/d4295016535/htdocs/my-homepage-com [] []
[2021-11-21 02:30:37] xcloner_file_system.INFO: Adding .htaccess to the filesystem list ["FILESYSTEM SCAN","INCLUDE"] []
[2021-11-21 02:30:37] xcloner_file_system.INFO: Adding index.php to the filesystem list ["FILESYSTEM SCAN","INCLUDE"] []
[2021-11-21 02:30:37] xcloner_file_system.INFO: Adding license.txt to the filesystem list ["FILESYSTEM SCAN","INCLUDE"] []
[2021-11-21 02:30:37] xcloner_file_system.INFO: Adding liesmich.html to the filesystem list ["FILESYSTEM SCAN","INCLUDE"] []
[2021-11-21 02:30:37] xcloner_file_system.INFO: Adding php.ini to the filesystem list ["FILESYSTEM SCAN","INCLUDE"] []
[2021-11-21 02:30:37] xcloner_file_system.INFO: Adding readme.html to the filesystem