Skip to content

Instantly share code, notes, and snippets.

@adamshamsudeen
Last active November 22, 2018 08:59
Show Gist options
  • Save adamshamsudeen/1950b5130a9ebd2a4e18059a0f37b720 to your computer and use it in GitHub Desktop.
Save adamshamsudeen/1950b5130a9ebd2a4e18059a0f37b720 to your computer and use it in GitHub Desktop.
script to extract the ngrok forwarding hostname
#!/bin/bash
# Thanks to @fvclaus
curl --silent --show-error http://127.0.0.1:4040/api/tunnels | sed -nE 's/.*public_url":"(https:[^"]*).*/\1/p'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment