This file contains 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
def getCheckedOutGitCommitHash() { | |
def gitFolder = "$projectDir/.git/" | |
def takeFromHash = 12 | |
/* | |
* '.git/HEAD' contains either | |
* in case of detached head: the currently checked out commit hash | |
* otherwise: a reference to a file containing the current commit hash | |
*/ | |
def head = new File(gitFolder + "HEAD").text.split(":") // .git/HEAD | |
def isCommit = head.length == 1 // e5a7c79edabbf7dd39888442df081b1c9d8e88fd |
This file contains 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
// TODO add <meta-data android:value="GlideModule" android:name="....OkHttpProgressGlideModule" /> | |
// TODO add <meta-data android:value="GlideModule" tools:node="remove" android:name="com.bumptech.glide.integration.okhttp.OkHttpGlideModule" /> | |
// or not use 'okhttp@aar' in Gradle depdendencies | |
public class OkHttpProgressGlideModule implements GlideModule { | |
@Override public void applyOptions(Context context, GlideBuilder builder) { } | |
@Override public void registerComponents(Context context, Glide glide) { | |
OkHttpClient client = new OkHttpClient(); | |
client.networkInterceptors().add(createInterceptor(new DispatchingProgressListener())); | |
glide.register(GlideUrl.class, InputStream.class, new OkHttpUrlLoader.Factory(client)); | |
} |
This file contains 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
docker-machine create \ | |
--driver=digitalocean \ | |
--digitalocean-access-token=$DO_TOKEN \ | |
--digitalocean-size=512mb \ | |
--digitalocean-region=nyc3 \ | |
--digitalocean-private-networking=true \ | |
--digitalocean-image=ubuntu-15-10-x64 \ | |
docker-swarm-kv-store | |
docker $(docker-machine config docker-swarm-kv-store) run -d \ |