Skip to content

Instantly share code, notes, and snippets.

View tinkernels's full-sized avatar
🦉
Focusing

Don Johnny tinkernels

🦉
Focusing
  • Earth
View GitHub Profile
@tinkernels
tinkernels / ocserv.conf
Created January 28, 2015 01:43
ocserv configuration file example.
# User authentication method. Could be set multiple times and in
# that case all should succeed. To enable multiple methods use
# multiple auth directives. Available options: certificate, certificate[optional],
# plain, pam.
#auth = "certificate"
#auth = "plain[./ocserv-passwd]"
#auth = "pam"
# This indicates that a user may present a certificate. When that option
# is set, individual users or user groups can be forced to present a valid
@tinkernels
tinkernels / davy.sh
Created June 13, 2019 18:01
upload or download direcotry at webdav recursively
#!/usr/bin/env bash
usage () {
echo "$0 put <src> <cadaver-args>*" >/dev/stderr;
echo "$0 get [more wget arguments] <url>" >/dev/stderr;
}
error () { echo "$1" >/dev/stderr; usage; exit 1; }
test $# '>' 1 || \
#!/usr/bin/env python3
import os
from pathlib import Path
from chardet.universaldetector import UniversalDetector
from binaryornot.check import is_binary
base_path = "."
encoding_map = {
@tinkernels
tinkernels / 0-tcp_bbrplus.md
Last active August 30, 2023 13:32
patch tcp_bbr with bbr_drain_to_target_cycling (bbrplus)
@tinkernels
tinkernels / self-path-verbose.sh
Last active March 9, 2022 14:05
Get the shell file real path itself when executed or sourced.
#!/usr/bin/env bash
echo "---------------- GET SELF PATH ----------------"
echo "NOW \$(pwd) >>> $(pwd)"
ORIGINAL_PWD_GETSELFPATHVAR=$(pwd)
echo "NOW \$0 >>> $0"
echo "NOW \$_ >>> $_"
echo "NOW \${0##*/} >>> ${0##*/}"
@tinkernels
tinkernels / right-click_menu_cmd.reg
Last active December 26, 2021 20:43
Add the Command Prompt to the Windows Explorer Right-Click Menu
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\CommandPrompt]
@="Open Command Prompt"
"Icon"="C:\\Windows\\System32\\cmd.exe"
[HKEY_CLASSES_ROOT\Directory\shell\CommandPrompt\Command]
@="cmd.exe /s /k pushd \"%1\""
[HKEY_CLASSES_ROOT\Directory\Background\shell\cmd_shell]
@="Open Command Prompt"