Skip to content

Instantly share code, notes, and snippets.

Created Mar 9, 2019
What would you like to do?
pkill -f ngrok
ngrok http $1 &> ~/.ngrok.log &
sleep 1
echo -n 'ngrok http '
json=$(curl -s http://localhost:4040/api/tunnels)
echo "$json" | python3 -c "import sys, json; print(json.load(sys.stdin)['tunnels'][0]['public_url'])" || echo $json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment