-- listen for console connection with the given secret key
-- controlSocket("0.0.0.0")
-- setKey(please generate a fresh private key with makeKey())
-- start the web server on port 8083, using password 'set a random password here'
-- webserver("0.0.0.0:8083", "set a random password here")
-- accept DNS queries on UDP/5200 and TCP/5200
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
# Set variables in .bashrc file | |
# don't forget to change your path correctly! | |
export GOPATH=$HOME/golang | |
export GOROOT=/usr/local/opt/go/libexec | |
export PATH=$PATH:$GOPATH/bin | |
export PATH=$PATH:$GOROOT/bin |
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
# used different forum posts/guides to figure this out like: | |
# The uninstall script is located at /Library/Parallels/Parallels Service.app/Contents/Resources | |
# https://github.com/danijeljw/remparallels/blob/master/remprls.sh | |
# https://kb.parallels.com/122461 | |
# sudo find / -iname "*parallels*" | |
# sudo find / -iname "*prl*" | |
#before uninstalling deactivate your licencse - this won't be possible after uninstall | |
prlsrvctl deactivate-license |
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
package main | |
import ( | |
"fmt" | |
"math" | |
"strconv" | |
) | |
var ( | |
sizeInMB float64 = 999 // This is in megabytes |
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
package main | |
import ( | |
"crypto/md5" | |
"fmt" | |
"io" | |
"net/http" | |
"os" | |
"strconv" | |
"text/template" |
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
// curl -X POST -H "Content-Type: application/octet-stream" --data-binary '@filename' http://127.0.0.1:5050/upload | |
package main | |
import ( | |
"fmt" | |
"io" | |
"net/http" | |
"os" | |
"time" |
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
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"os" | |
"path/filepath" | |
"strings" | |
) |
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
# The general procedure here is adapted from the 7->8 guide here. https://www.tecmint.com/upgrade-centos-7-to-centos-8/ | |
# | |
# It is a curated list of my bash history. I entered other commands so hopefully I got the right ones here. | |
yum upgrade | |
reboot | |
dnf install epel-release | |
dnf install rpmconf | |
dnf install yum-utils | |
rpmconf -a # answer "n" to both things |
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
# https://serverfault.com/questions/545441/nginx-geo-location-module-configuration-using-geo-database | |
# http://nginx.org/en/docs/http/ngx_http_geo_module.html#directives | |
# https://www.howtoforge.com/nginx-how-to-block-visitors-by-country-with-the-geoip-module-debian-ubuntu | |
# https://dev.maxmind.com/geoip/legacy/geolite/ | |
geoip_country /usr/share/GeoIP/GeoIP.dat; | |
map $geoip_country_code $backend { | |
default US; | |
US US; | |
CN DE; |
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
require 'math' | |
math.randomseed(os.time()) | |
dns_providers = { | |
{ -- Quad9 | |
{'9.9.9.9', hostname='dns.quad9.net', ca_file='/usr/local/etc/kresd/DigiCertECCSecureServerCA.pem'}, | |
{'149.112.112.112', hostname='dns.quad9.net', ca_file='/usr/local/etc/kresd/DigiCertECCSecureServerCA.pem'} | |
}, | |
{ -- Cloudflare | |
{'1.1.1.1', hostname='cloudflare-dns.com', ca_file='/usr/local/etc/kresd/DigiCertECCSecureServerCA.pem'}, |
NewerOlder