Replace [your key] with your key ID
To obtain your key ID
gpg --list-secret-keys --keyid-format LONG
Which returns something like
package me.eugeniomarletti.example; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.support.annotation.NonNull; | |
import android.support.annotation.Nullable; | |
import android.widget.Toast; | |
import rx.Observable; | |
import rx.Subscriber; | |
import rx.Subscription; |
String getJavaHome(String version) | |
{ | |
def stdout = new ByteArrayOutputStream() | |
exec { | |
commandLine "/usr/libexec/java_home", "-v", version | |
standardOutput = stdout; | |
} | |
return stdout.toString().trim() | |
} |
HTTP status code symbols for Rails | |
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings. | |
Status Code Symbol | |
1xx Informational | |
100 :continue | |
101 :switching_protocols | |
102 :processing |
Sometimes you want to use a gem on Heroku that is in a private repository on GitHub.
Using git over http you can authenticate to GitHub using basic authentication. However, we don't want to embed usernames and passwords in Gemfiles. Instead, we can use authentication tokens.
First you will need to get an OAuth Token from GitHub using your own username and "note"