Created
June 28, 2017 01:00
-
-
Save anonymous/a3971b6a14920a22246e14801fc94623 to your computer and use it in GitHub Desktop.
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
tunnels: | |
gotty-shell: | |
proto: http | |
addr: 8080 | |
bind_tls: true | |
web: | |
proto: http | |
addr: 3000 | |
bind_tls: true |
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
#!/bin/sh | |
echo "Starting ngrok" | |
ngrok start --config ~/bin/ngrok.yml gotty-shell web >/dev/null & | |
sleep 1 | |
URLS=$(curl -s localhost:4040/api/tunnels | jq -r '.tunnels[] | "\(.name): \(.public_url)"') | |
echo $URLS | xclip | |
echo $URLS | |
echo | |
echo "Starting gotty. ^C to terminate" | |
gotty -w tmux attach -t base 2>/dev/null | |
echo "Gotty exited. Terminating ngrok" | |
killall ngrok | |
echo "Bye!" | |
echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment