Skip to content

Instantly share code, notes, and snippets.

View ethankhall's full-sized avatar

Ethan Hall ethankhall

  • Gusto
  • Seattle, WA
View GitHub Profile
@ethankhall
ethankhall / build.gradle
Last active December 16, 2015 17:29
Using Gradle with the Android plugin to add a JNI project to the APK.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.3'
}
}
sourceCompatibility = JavaVersion.VERSION_1_6
@ethankhall
ethankhall / MainActivity.java
Created April 7, 2013 14:03
Rotation support for SherlockFragmentActivity and SherlockFragment
public class RootActivity extends SherlockFragmentActivity implements ActionBar.TabListener {
static private Fragment listOfFragments[];
private static final String TAG = RootActivity.class.getName();
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (savedInstanceState == null) {
@ethankhall
ethankhall / MagicalLand.java
Last active December 13, 2015 23:19
Magical Java Puzzle: “Pat The Unicorns”
package io.ehdev;
public class MagicalLand {
public static void main(String[] args) {
for (int i = 0; i < (Math.random() * 500) + 2; i++) {
if (Unicorn.pat()) {
System.out.println("UNICORN #1: PAT THIS UNICORN ONCE");
}
}
@ethankhall
ethankhall / Debug out of the issue
Created October 8, 2012 01:52
Error report for Android Gradle support - Basic
20:51:19.786 [DEBUG] [org.gradle.logging.internal.DefaultLoggingConfigurer] Finished configuring with level: DEBUG, configurers: [org.gradle.logging.internal.OutputEventRenderer@1aac087b, org.gradle.logging.internal.logback.LogbackLoggingConfigurer@1460d0eb, org.gradle.logging.internal.JavaUtilLoggingConfigurer@6033fec0]
20:51:20.807 [DEBUG] [org.gradle.logging.internal.DefaultLoggingConfigurer] Finished configuring with level: DEBUG, configurers: [org.gradle.logging.internal.OutputEventRenderer@1aac087b, org.gradle.logging.internal.logback.LogbackLoggingConfigurer@1460d0eb, org.gradle.logging.internal.JavaUtilLoggingConfigurer@6033fec0]
20:51:20.813 [INFO] [org.gradle.BuildLogger] Starting Build
20:51:20.814 [DEBUG] [org.gradle.BuildLogger] Gradle user home: /home/ethan/.gradle
20:51:20.816 [DEBUG] [org.gradle.BuildLogger] Current dir: /home/ethan/IdeaProjects/PinballTracker
20:51:20.818 [DEBUG] [org.gradle.BuildLogger] Settings file: null
20:51:20.820 [DEBUG] [org.gradle.BuildLogger] Build file: null
20:51: