Skip to content

Instantly share code, notes, and snippets.

View restorer's full-sized avatar

Viachaslau Tratsiak restorer

View GitHub Profile
@restorer
restorer / KeyValueIterator.hx
Created October 3, 2016 19:01 — forked from RealyUniqueName/KeyValueIterator.hx
Key-value map iterator
class KeyValueIterator<K,V> {
var map:Map<K,V>;
var keys:Iterator<K>;
static public inline function pairs<K,V>(map:Map<K,V>) return new KeyValueIterator(map);
public inline function new(map:Map<K,V>) {
this.map = map;
this.keys = map.keys();
}
@restorer
restorer / EspressoTestRule.java
Created September 2, 2018 12:14 — forked from patrickhammond/EspressoTestRule.java
Hacking through Espresso issues...
import android.app.Activity;
import android.app.Instrumentation;
import android.app.KeyguardManager;
import android.app.KeyguardManager.KeyguardLock;
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.IBinder;
import android.os.PowerManager;
import android.os.PowerManager.WakeLock;
import android.support.test.InstrumentationRegistry;