Skip to content

Instantly share code, notes, and snippets.

View HannahMitt's full-sized avatar

Hannah Mittens Morrison HannahMitt

  • Etsy
  • Brooklyn
View GitHub Profile
public class Triangle {
public static String identifyTriangle(Point w, Point r, Point t) {
double A, B, C;
double angA, angB, angC;
String sideClass, angleClass;
A = distance(w, r);
B = distance(w, t);
C = distance(r, t);
@HannahMitt
HannahMitt / gist:b26190778e9091d168b8
Created November 2, 2015 20:51
Example JUnit4 Test
package com.etsy.android.perf;
import android.app.Instrumentation;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.LargeTest;
import com.etsy.android.BOEApplication;
import com.etsy.android.test.rules.EtsyAccountRule;
import com.etsy.android.test.rules.EtsyConfigRule;
@HannahMitt
HannahMitt / generatepublicresources.gradle
Last active May 13, 2023 08:14
This is a gradle task to generate the public.xml file in an Android library project. It assumes all public resources are kept in a res-public/ resource source directory. Providing this as a starting point, but there may be more efficient ways.
import groovy.xml.MarkupBuilder
// Task to generate our public.xml file
// See https://developer.android.com/studio/projects/android-library.html#PrivateResources
// We assume resources within res-public are public
task generatepublicxml {
def resDir = project.projectDir.absolutePath + "/src/main/res-public"
// Include the desired res types