Skip to content

Instantly share code, notes, and snippets.

Avatar
♠️

Martin Braun martin-braun

♠️
View GitHub Profile
@martin-braun
martin-braun / karabiner.json
Created March 29, 2023 03:48
My Karabiner settings (keybindings)
View karabiner.json
{
"global": {
"ask_for_confirmation_before_quitting": true,
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false,
"unsafe_ui": false
},
"profiles": [
{
@martin-braun
martin-braun / install_node_suite.sh
Created February 23, 2023 18:40
Find recommend NPM version for current node version
View install_node_suite.sh
#!/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 / .zshrc
Created January 14, 2023 20:28
Lazy load NVM
View .zshrc
if [ -s "$HOME/.nvm/nvm.sh" ]; then
export NVM_DIR="$HOME/.nvm"
nvm() {
unset -f nvm
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm $@
}
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
DEFAULT_NODE_VER="$(cat "$NVM_DIR/alias/default" 2> /dev/null)"
while [ -s "$NVM_DIR/alias/$DEFAULT_NODE_VER" ] && [ ! -z "$DEFAULT_NODE_VER" ]; do
@martin-braun
martin-braun / curl_wget_test.sh
Last active January 8, 2023 12:01
curl_wget_test.sh
View curl_wget_test.sh
#!/usr/bin/env bash
hello() {
echo Hello World!
}
echo It worked!
echo ''
echo Arguments: $@
@martin-braun
martin-braun / de_regular_german_kjoetoms-time-moves-1_mb-h4cker-edition_de60-en40_ext.txt
Last active November 27, 2022 00:36
H4cker extension for kjoetoms EN/DE 60/40 keymap (Guide)
View de_regular_german_kjoetoms-time-moves-1_mb-h4cker-edition_de60-en40_ext.txt
e (E) = C T L C
d (D) = C T L B C
z (Z) = C T L B R C
q (Q) = C T L B R T C
s (S) = C R T C
g (G) = C R T L C
v (V) = C R T L B C
x (X) = C R T L B R C
c (C) = C B R C
u (U) = C B R T C
@martin-braun
martin-braun / 8vim2txt.py
Last active October 26, 2022 23:44
8vim keymap to text list
View 8vim2txt.py
#!/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 September 20, 2022 12:44 — forked from jult/.stglobalignore
syncthing ignore file(s) .stglobalignore and .stignore
View .stglobalignore
// .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
View gist:7c401af831e35343474e6a6aa69c11cc
[ 0.000000] Linux version 5.4.174-2-pve (build@proxmox) (gcc version 8.3.0 (Debian 8.3.0-6)) #1 SMP PVE 5.4.174-2 (Thu, 10 Mar 2022 15:58:44 +0100) ()
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.4.174-2-pve root=/dev/mapper/pve-root ro quiet
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Hygon HygonGenuine
[ 0.000000] Centaur CentaurHauls
[ 0.000000] zhaoxin Shanghai
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
@martin-braun
martin-braun / bootstrap.model.wrapper.js
Created February 25, 2022 17:16
bootstrap.model.wrapper.js
View 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
View 00default-release
APT::Default-Release "testing";