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 to refresh tokens using https://github.com/auth0/node-jsonwebtoken | |
* It was requested to be introduced at as part of the jsonwebtoken library, | |
* since we feel it does not add too much value but it will add code to mantain | |
* we won't include it. | |
* | |
* I create this gist just to help those who want to auto-refresh JWTs. | |
*/ | |
const jwt = require('jsonwebtoken'); |
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 | |
sudo networksetup -setwebproxy "Wi-Fi" "localhost" "8888" | |
sudo networksetup -setsecurewebproxy "Wi-Fi" "localhost" "8888" | |
# --insecure is added for development usage, where you may use self signed certificates | |
mitmproxy -p 8888 --insecure | |
sudo networksetup -setwebproxy "Wi-Fi" "" "" | |
sudo networksetup -setsecurewebproxy "Wi-Fi" "" "" | |
sudo networksetup -setwebproxystate wi-fi off |
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
# See http://superuser.com/questions/14403/how-can-i-download-an-entire-website | |
# You can install wget in mac with brew. | |
wget --mirror -p --html-extension --convert-links www.example.com |
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
#sudo apt-get install tcpflow | |
sudo tcpflow -i any -C -e port <port> |