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
package com.example; | |
import com.nineoldandroids.animation.Animator; | |
/* | |
* animate(view).alpha(0).setListener(AnimationUtils.withEndAction(new Runnable() { | |
* public void run() { | |
* view.setVisibility(View.GONE); | |
* view.setAlpha(1); // restore alpha | |
* } |
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
package com.example; | |
import android.app.AlarmManager; | |
import android.app.PendingIntent; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.os.SystemClock; | |
import android.util.Log; | |
/** |
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
android { | |
def gitTag = { | |
def tagMatchOptions | |
try { | |
tagMatchOptions = "--match ${tagToBuildFrom}" | |
} catch (MissingPropertyException) { | |
tagMatchOptions = "" | |
} | |
"git describe --exact HEAD ${tagMatchOptions}".execute().text.trim() | |
}() |
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
dependencies { | |
def dagger_version = "1.1.0" | |
compile "com.squareup.dagger:dagger:${dagger_version}" | |
compile "com.squareup.dagger:dagger-compiler:${dagger_version}" | |
} |
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
/* | |
* Copyright (C) 2013 Onavo Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
dependencies { | |
def dagger_version = "1.1.0" | |
compile "com.squareup.dagger:dagger:${dagger_version}" | |
compile "com.squareup.dagger:dagger-compiler:${dagger_version}" | |
} |
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
package com.example; | |
import android.content.Context; | |
import com.squareup.okhttp.HttpResponseCache; | |
import com.squareup.okhttp.OkHttpClient; | |
import com.squareup.picasso.OkHttpDownloader; | |
import com.squareup.picasso.Picasso; | |
import javax.net.ssl.SSLContext; | |
import java.io.File; |
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
#!/usr/bin/env python | |
# | |
# Sample usage: | |
# | |
# % lint my_android_app | android_lint_summarizer.py | |
# 26 SpUsage | |
# 10 I18N HardcodedText | |
# 8 Accessibility ContentDescription | |
# 2 Typos | |
# 1 IconDuplicates |
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
#!/bin/bash | |
# An improved version is now in the nginx-buildpack repository: | |
# https://github.com/ryandotsmith/nginx-buildpack/blob/17b290ed880a182ef27f438eab3070f081c0ee0e/scripts/build_nginx.sh | |
# | |
# Building nginx with rewrite_module for use in heroku buildpacks - specifically in @ryandotsmith's https://github.com/ryandotsmith/nginx-buildpack. | |
# Uses heroku's vulcan for building (`gem install vulcan`). | |
# Can be used as a template for any kind of compile-time configuration of nginx. | |
cd $(mktemp -d /tmp/vulcan_nginx.XXXXXXXXXX) | |
echo $PWD |
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
# Based on https://code.google.com/p/gource/issues/detail?id=8#c27 | |
# | |
# Usage: | |
# for x in *; do | |
# gource --output-custom-log $x.txt /path/to/repos/$x | |
# done | |
# python annotate_gource_log.py *.txt | sort -n > combined.txt | |
# gource combined.txt | |
import fileinput, sys |