Skip to content

Instantly share code, notes, and snippets.

Avatar
♠️

Martin Braun martin-braun

♠️
View GitHub Profile
@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";
@martin-braun
martin-braun / xcloner-ea366.log
Last active November 26, 2021 17:39
xcloner-log
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