I hereby claim:
- I am pieces029 on github.
- I am areitz (https://keybase.io/areitz) on keybase.
- I have a public key whose fingerprint is 6513 2A0E 64C9 3BC1 EDB4 BA62 0221 9C76 97C0 FB6E
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
public final class CrashlyticsTree extends HollowTree { | |
private static final Pattern ANONYMOUS_CLASS = Pattern.compile("\\$\\d+$"); | |
private enum LogLevel { | |
INFO, | |
ERROR, | |
WARNING | |
} | |
@Override public void i(String message, Object... args) { |
gradle.projectsEvaluated { | |
tasks.withType(JavaCompile) { | |
options.compilerArgs << "-Xlint:unchecked" | |
} | |
} |
# Find something in a directory above the one you are in | |
function upfind() { | |
dir=`pwd` | |
while [ "$dir" != "/" ]; do | |
path=`find "$dir" -maxdepth 1 -name $1` | |
if [ ! -z $path ]; then | |
echo "$path" | |
return | |
fi | |
dir=`dirname "$dir"` |
/** | |
* PushTester | |
* | |
* Copyright 2014 Andrew Reitz | |
* | |
*/ | |
definition( | |
name: "PushTester", | |
namespace: "com.andrewreitz", | |
author: "Andrew Reitz", |
def randDots:String = { | |
val nLines = 100 | |
val width = 80 | |
Seq.range(0, nLines*width).map(a=>if(scala.util.Random.nextBoolean())"." else " ").grouped(width).map(_.mkString("")).mkString("\n") | |
} | |
while(true){ | |
println(randDots) | |
Thread.sleep(scala.util.Random.nextInt(5000)) | |
} |
Observable.create(new Observable.OnSubscribe<T>() { | |
@Override public void call(Subscriber<? super T> subscriber) { | |
final Cursor cursor = cursorLoader.getCursor(); | |
if (cursor.moveToFirst()) { | |
while (!cursor.isAfterLast()) { | |
if (!subscriber.isUnsubscribed()) { | |
subscriber.onNext(cursor)); | |
cursor.moveToNext(); | |
} | |
} |
package lol; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.Target; | |
import static java.lang.annotation.ElementType.CONSTRUCTOR; | |
import static java.lang.annotation.ElementType.FIELD; | |
import static java.lang.annotation.ElementType.METHOD; | |
import static java.lang.annotation.ElementType.PARAMETER; | |
import static java.lang.annotation.ElementType.TYPE; |
// Checkstyle | |
apply plugin: 'checkstyle' | |
checkstyle { | |
showViolations true | |
configFile = rootProject.file('codequality/checkstyle.xml') | |
} | |
def isLibraryPlugin = project.plugins.findPlugin('android-library') != null | |
def setupCheck = { variant -> | |
def name = variant.buildType.name |
var n = 60 | |
var n2 = 20 | |
while (true) { | |
n = n + (if (scala.util.Random.nextBoolean()) 1 else -1) | |
n = n max 0 min 80 | |
n2 = n2 + (if (scala.util.Random.nextBoolean()) 1 else -1) | |
n2 = n2 max 0 min 80 | |
for (i <- 0 until (n min n2)) print(" ") | |
if (n2 < n) print("░") else print("█") | |
for (i <- 0 until (n max n2) - (n min n2)) print(" ") |