Skip to content

Instantly share code, notes, and snippets.

@mwinters-stuff
mwinters-stuff / CustomMatchers.java
Last active February 3, 2017 19:46
Espresso for Android - Finding Listviews by Tag for onData
package nz.org.winters.android.widgetscommon.tests;
import android.support.test.espresso.DataInteraction;
import android.support.test.espresso.matcher.BoundedMatcher;
import org.hamcrest.Description;
import org.hamcrest.Matcher;
import nz.org.winters.android.widgetscommon.settings.FABPreferenceFragment;
import nz.org.winters.android.widgetscommon.settings.SettingGroupListFragment;
@genghisjahn
genghisjahn / colorgitbash.bash
Created June 12, 2014 03:41
Colorful Informative Github Bash Prompt
export PS1='$(git branch &>/dev/null; if [ $? -eq 0 ]; then \
echo "\[\e[0;32m\][GIT: \[\e[0;31m\]$(basename `pwd`); \[\e[0;33m\]$(git branch | grep ^*|sed s/\*\ //) \
$(echo `git status` | grep "nothing to commit" > /dev/null 2>&1; if [ "$?" -eq "0" ]; then \
echo "\[\e[0;32m\]clean"; else \
echo "\[\e[0;31m\]dirty"; fi)\[\e[0;32m\]] \$ "; else \
echo "\[\e[0;31m\][\w]\[\e[m\] \$ "; fi) \[\e[0m\]'