Skip to content

Instantly share code, notes, and snippets.

View bomale's full-sized avatar
😛

Alessandro bomale

😛
View GitHub Profile
@bomale
bomale / wsl-remote
Created March 14, 2022 18:12
WSL Remote port firewall
$remoteport = bash.exe -c "ifconfig eth0 | grep 'inet '"
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}';
if( $found ){
$remoteport = $matches[0];
} else{
echo "The Script Exited, the ip address of WSL 2 cannot be found";
exit;
}
@bomale
bomale / LetsEncrypt.mustache
Created November 10, 2021 19:42
fix http challenge
#/usr/syno/sbin/syno-letsencrypt renew-all -vv
##OR https://letsdebug.net/ fill domain field and send form, click on "Show verbose information" (?debug=y)
##go to #LetsEncryptStaging-Debug section
#now copy param based on this format "The key authorization file from the server did not match this challenge "URI.ACCOUNT_TOKEN" != "SOMETHING WRONG"
#edit /usr/syno/share/nginx/LetsEncrypt.mustache
location ~ ^/.well-known/acme-challenge/(.*)$ {
default_type text/plain;
return 200 $1.ACCOUNT_TOKEN;
}
#save it and synosystemctl restart nginx
@bomale
bomale / ddns-update
Last active May 20, 2022 14:23 — forked from ndunks/ddns-update
Namecheap DDNS Updater Bash Script
# make it executable `chmod +x ddns-update`
# move it path `mv ddns-update /usr/bin/`
# setup cronjob for every 15 minutes `crontab -e`
# */15 * * * * ddns-update >/dev/null 2>&1
# dont forget to change your own domain & password
# uncomment if you want internet connection check before running
#while ! ping -c 1 -W 1 8.8.8.8; do
# echo "DDNS-UPDATE: Waiting internet connection.."
# sleep 2