Last active
July 10, 2018 08:30
-
-
Save cb109/518b587bd56fb37ed7fa5572aaec08d4 to your computer and use it in GitHub Desktop.
Render ngrok URL as QR code in your terminal
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/bash | |
| # | |
| # Assuming you have a running ngrok session, this snippet fetches the | |
| # https URL from ngrok's local API and renders it as a QR code in your | |
| # terminal. You can then scan it with a mobile phone to quickly load | |
| # that URL. | |
| # | |
| # Based on: | |
| # https://github.com/stedolan/jq/issues/861 | |
| # | |
| # Requirements: | |
| # $ sudo apt-get install curl jq qrencode | |
| # | |
| qrencode -t UTF8 $( | |
| curl --silent http://localhost:4040/api/tunnels | | |
| jq '.tunnels[] | select(.proto == "https").public_url' | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
