Example from Android Jetpack: LiveData
| MutableLiveData Example |
|---|
![]() |
| MutableLiveData Example |
|---|
![]() |
| #!/bin/sh | |
| ######################################################################################## | |
| # I do not need to use the ngrok subdomains... | |
| # start ngrok for my local box (vagrant homestead) in th background | |
| # get the cname from command line for the ngrok alias | |
| # update my subdomain cname to point at new ngrok name | |
| # use it!!! | |
| ######################################################################################## | |
| # requires ngrok and jq installed. |
| #!/bin/sh | |
| # ngrok's web interface is HTML, but configuration is bootstrapped as a JSON | |
| # string. We can hack out the forwarded hostname by extracting the next | |
| # `*.ngrok.io` string from the JSON | |
| # | |
| # Brittle as all get out--YMMV. If you're still reading, usage is: | |
| # | |
| # $ ./ngrok_hostname.sh <proto> <addr> | |
| # |
| private class HttpInterceptor implements Interceptor { | |
| @Override | |
| public Response intercept(Chain chain) throws IOException { | |
| Request request = chain.request(); | |
| //Build new request | |
| Request.Builder builder = request.newBuilder(); | |
| builder.header("Accept", "application/json"); //if necessary, say to consume JSON | |
| git remote add github [EMAIL PROTECTED]:myaccount/myapp.git | |
| git remote add heroku [EMAIL PROTECTED]:myapp.git | |
| Then you can do “git push heroku” and “git push github”, or pull, or | |
| From: http://blog.mindtonic.net/using-github-and-heroku-together |