This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use 5.014; | |
use autodie; | |
do { | |
say "Usage: hex2bin <input> <output>"; | |
exit(1); | |
} unless @ARGV == 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
listenport_on_remote=5500 | |
identity_key=/home/me/.ssh/tunnel | |
############################# | |
REMOTE=$1 | |
if [ ! "$REMOTE" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
file=$1 | |
lines=$2 | |
sumLines=$(wc -l $file | cut -f1 -d' ') | |
processed=0 | |
part=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s/[\x00-\x08]//g | |
s/[\x0A-\x0C]//g | |
s/[\x0E-\x1F]//g |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Example: | |
"ma<B3>gorzata posz<B3>a do domu" | |
`<B3>' which stands for `ł' character in cp1250 encoding | |
which gets decoded to "małgorzata poszła do domu" | |
Example application in vim editor | |
Place the script in your $PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Install dnscrypt-proxy (https://dnscrypt.org) and Unbound (https://unbound.net) | |
2. Set up dnscrypt to listen on 127.0.0.1 port 40 | |
# VISUAL=vim systemctl edit dnscrypt-proxy.socket -> paste override.conf | |
3. "Enable" DNS Crypt socket for autostart and start it now | |
# systemctl enable dnscrypt-proxy.socket | |
# systemctl start dnscrypt-proxy.socket | |
4. Edit /etc/unbound/unbound.conf -> paste unbound.conf (adjust to your needs) | |
5. Download root.hints | |
# wget ftp://FTP.INTERNIC.NET/domain/named.cache -O /etc/unbound/root.hints | |
6. "Enable" Unbound service for autostart and start it now |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mpw | |
export MP_FULLNAME="Your Full Name" | |
function cmpw() { | |
mpw $* | tee >(tr -d '\n' | xclip -l 1 -selection clipboard) 1>/dev/null && echo | |
} |