Skip to content

Instantly share code, notes, and snippets.

Avatar
♠️

Martin Braun martin-braun

♠️
View GitHub Profile
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
View curl_wget_test.sh
#!/usr/bin/env bash
hello() {
echo Hello World!
}
echo It worked!
echo ''
echo Arguments: $@
View lxc-compose.deb
#!/usr/bin/env bash
function require() {
if ! dpkg -l "$1" | grep -q ^ii; then
apt install "$@" -y
. "$HOME/.bashrc"
fi
}
trap 'echo "[$] $BASH_COMMAND"' DEBUG && set -e
@martin-braun
martin-braun / de_regular_german_kjoetoms-time-moves-1_mb-h4cker-edition_de60-en40_ext.txt
Last active Nov 27, 2022
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 Oct 26, 2022
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 Sep 20, 2022 — 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'
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 Feb 21, 2022 — forked from khimaros/00default-release
debian testing with automatic security updates from unstable
View 00default-release
APT::Default-Release "testing";
View xcloner-ea366.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