Skip to content

Instantly share code, notes, and snippets.

Created June 28, 2017 01:00
Show Gist options
  • Save anonymous/a3971b6a14920a22246e14801fc94623 to your computer and use it in GitHub Desktop.
Save anonymous/a3971b6a14920a22246e14801fc94623 to your computer and use it in GitHub Desktop.
tunnels:
gotty-shell:
proto: http
addr: 8080
bind_tls: true
web:
proto: http
addr: 3000
bind_tls: true
#!/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