Skip to content

Instantly share code, notes, and snippets.


Eduardo Diaz ziluvatar

View GitHub Profile
ziluvatar / token-generator.js
Last active Jan 10, 2021
Example of refreshing tokens with jwt
View token-generator.js
* Example to refresh tokens using
* 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');
ziluvatar /
Last active Apr 4, 2018
Setup web proxy on macOs + run mitmproxy
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
ziluvatar / gist:dcbddfaaf408e0586d4b
Created Jan 16, 2016
Download an entire website
View gist:dcbddfaaf408e0586d4b
# See
# You can install wget in mac with brew.
wget --mirror -p --html-extension --convert-links
ziluvatar / gist:8713455
Created Jan 30, 2014
Linux command to sniff a port in console
View gist:8713455
#sudo apt-get install tcpflow
sudo tcpflow -i any -C -e port <port>
You can’t perform that action at this time.