Sign up for a GitHub account Sign in All Gists nijotz / gist:2ccbaa76d8d47ec9c8c5 Created May 27, 2015 Code Revisions 1 /.sunken-menu-group /.sunken-menu-contents Embed HTTPS SSH You can clone with HTTPS or SSH . Download Gist /.only-with-full-nav Hacky way of getting the external URL to the ngrok proxy View gist:2ccbaa76d8d47ec9c8c5 gistfile1.rb Raw File suppressed. Click to show. 1 2 3 4 5 6 # Hacky way of getting the external URL to the ngrok proxy require ' net/http ' uri = URI .parse( ' http://localhost:4040/http/in ' ) response = Net :: HTTP .get_response(uri) config_json = response.body.split( " \n " ).grep( / window / )[ 0 ].sub( / .*parse \(\" / , ' ' ).sub( / \"\)\; / , ' ' ).gsub( / \\ / , ' ' ) external_url = JSON ::parse(config...