Skip to content

Instantly share code, notes, and snippets.

View KenVanHoeylandt's full-sized avatar

Ken Van Hoeylandt KenVanHoeylandt

View GitHub Profile
@KenVanHoeylandt
KenVanHoeylandt / introrx.md
Created February 11, 2016 16:13 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@KenVanHoeylandt
KenVanHoeylandt / Android REST Controller with Cache-Control
Last active March 3, 2016 09:16 — forked from polbins/README.md
Android Response Caching using Retrofit 1.9 + OkHttp 2.2
#### Android REST Controller with Cache-Control
Android REST Controller with Simple Cache Control Headers using
Retrofit 1.9.0 + OkHttp 2.2.0
@KenVanHoeylandt
KenVanHoeylandt / ArrayAdapter.java
Created March 30, 2016 10:13 — forked from passsy/ArrayAdapter.java
ArrayAdapter for RecyclerView
import android.support.v7.widget.RecyclerView;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
/**
* Created by pascalwelsch on 04.07.14.
*/
public abstract class ArrayAdapter<T, VH extends RecyclerView.ViewHolder>
@KenVanHoeylandt
KenVanHoeylandt / build.gradle
Last active February 24, 2024 14:18
Gradle auto-installing pre-commit hook
apply from: rootProject.file('gradle/install-git-hooks.gradle')
@KenVanHoeylandt
KenVanHoeylandt / adb+.sh
Last active April 1, 2016 12:33
ADB command that proxies to all connected devices
#!/bin/bash
# from http://stackoverflow.com/a/8672540/3848666
# Script adb+
# Usage
# You can run any command adb provide on all your current devices
# ./adb+ <command> is the equivalent of ./adb -s <serial number> <command>
#
# Examples
# ./adb+ version
# ./adb+ install apidemo.apk
@KenVanHoeylandt
KenVanHoeylandt / OPENCV.md
Created April 3, 2016 21:39
OpenCV installation for OS X

Building and installing OpenCV on OS X for your Java project:

  • Download OpenCV
  • Make sure JAVA_HOME is set
  • Make sure ant is installed
  • build OpenCV:
    • mkdir build
    • cd build
    • cmake -G "Unix Makefiles" ..
    • make -j8
@KenVanHoeylandt
KenVanHoeylandt / RecyclerViewAssertions.java
Created April 5, 2016 08:18 — forked from chemouna/RecyclerViewAssertions.java
Some assertions to help with testing recyclerview with espresso.
import android.support.test.espresso.NoMatchingViewException;
import android.support.test.espresso.ViewAssertion;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import com.google.common.truth.Truth;
import java.util.ArrayList;
import org.hamcrest.Matcher;
import org.junit.Assert;
@KenVanHoeylandt
KenVanHoeylandt / DisableAnimationsRule.java
Last active April 5, 2016 11:15
DisableAnimationsRule
// Source: http://product.reverb.com/2015/06/06/disabling-animations-in-espresso-for-android-testing/
public class DisableAnimationsRule implements TestRule {
private Method mSetAnimationScalesMethod;
private Method mGetAnimationScalesMethod;
private Object mWindowManagerObject;
public DisableAnimationsRule() {
try {
Class<?> windowManagerStubClazz = Class.forName("android.view.IWindowManager$Stub");
Method asInterface = windowManagerStubClazz.getDeclaredMethod("asInterface", IBinder.class);
@KenVanHoeylandt
KenVanHoeylandt / MatterMost Theme
Created January 26, 2017 12:04
MatterMost Theme
#2e3136,#ffffff,#1e2124,#ffffff,#f04747,#282b30,#738bd7,#738bd7,#43b581,#faa61a,#faa61a,#ffffff,#36393e,#b0b0b8,#f04747,#4a433a,#738bd7,#0096cf,#26a970,#ffffff,monokai
@KenVanHoeylandt
KenVanHoeylandt / bash.sh
Created March 29, 2017 21:52
Terraform and Docker with GitLab and Jenkins instances
# Bind Docker socket to port
socat -d TCP-LISTEN:2376,range=127.0.0.1/32,reuseaddr,fork UNIX:/var/run/docker.sock