Skip to content

Instantly share code, notes, and snippets.

@nmr8acme
nmr8acme / gist:6733850
Created September 27, 2013 19:19
EGL error from multi-context Apportable app
09-27 12:03:25.275 538-1116/system_process I/ActivityManager﹕ START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.apportable.Spin/com.apportable.activity.VerdeActivity} from pid 3359
09-27 12:03:25.285 217-618/? D/ALSADevice﹕ handle->format: 0x2
09-27 12:03:25.285 217-618/? D/ALSADevice﹕ setHardwareParams: reqBuffSize 1024 channels 2 sampleRate 48000
09-27 12:03:25.285 217-618/? D/ALSADevice﹕ setHardwareParams: buffer_size 4096, period_size 1024, period_cnt 4
09-27 12:03:25.355 12407-12407/? D/dalvikvm﹕ Late-enabling CheckJNI
09-27 12:03:25.355 538-550/system_process I/ActivityManager﹕ Start proc com.apportable.Spin for activity com.apportable.Spin/com.apportable.activity.VerdeActivity: pid=12407 uid=10071 gids={50071, 3003, 1028}
09-27 12:03:25.435 538-549/system_process I/ActivityManager﹕ Config changes=480 {1.0 ?mcc?mnc en_US ldltr sw360dp w640dp h335dp 480dpi nrml long land finger -keyb/v/h -nav/h s.85 themeResource=null}
09-
all: json2bson
clean:
rm -f json2bson
json2bson: json2bson.c
${CC} $(shell pkg-config --cflags json libmongo-client glib-2.0) -Wall -O0 -ggdb3 -std=c99 ${CFLAGS} \
$(shell pkg-config --libs json libmongo-client glib-2.0) -o $@ $^
check: all
./json2bson <test.json >test.bson
package pg;
@interface Keep {
}
public class Main {
public static void main(String[] args) throws Exception {
System.out.println(
Class.forName(System.getenv("THE_CLASS"))
.getMethods()[0].invoke(null));
@nmr8acme
nmr8acme / README.md
Last active August 29, 2015 14:02 — forked from mbostock/.block

An animation of Mitchell’s best-candidate algorithm, which produces samples with blue-noise spectral characteristics that are useful for minimizing aliasing. Unlike uniform random sampling, best-candidate samples are more evenly distributed, with fewer samples close together. (A similar, but more efficient, algorithm is poisson-disc sampling.)

For each new sample, the best-candidate algorithm generates a fixed number of candidate samples, shown in gray. Here, 10 candidates are generated. The best candidate, shown in red, is the one that is farthest away from all previous (non-candidate) samples.

@nmr8acme
nmr8acme / gist:2eddef5e5611dd4d91f5
Created April 2, 2015 21:43
NewRelic Gradle plugin exception when used with Android Jack+Jill build tools
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Cannot invoke method dependsOn() on null object
* Try:
Run with --info or --debug option to get more log output.
https://www.youtube.com/watch?v=f84n5oFoZBc
http://www.infoq.com/presentations/Simple-Made-Easy
https://www.youtube.com/watch?v=LIb3L4vKZ7U
{"features":[{"geometry":{"coordinates":[[[-37.0655251,37.9886665],[-36.65665,38.0091171],[-36.23764,38.0286942],[-35.7953148,38.0542],[-35.3896027,38.0916],[-34.9871368,38.1276],[-34.5889168,38.1622467],[-34.1959419,38.1955757],[-33.8091927,38.2276573],[-33.4296455,38.25856],[-33.0582542,38.2883835],[-32.728466,38.3150063],[-32.4197044,38.3317375],[-32.1194153,38.3485374],[-31.828228,38.3655663],[-31.5349636,38.383358],[-31.243681,38.4034653],[-30.9529972,38.4266319],[-30.661665,38.453598],[-30.3685818,38.4851036],[-30.0728035,38.52187],[-29.7735233,38.56456],[-29.3705387,38.63489],[-29.0438118,38.71374],[-28.7170944,38.7974129],[-28.3905,38.8851738],[-28.0641575,38.9763069],[-27.7382336,39.07011],[-27.4129162,39.165905],[-27.0884285,39.26301],[-26.76503,39.36076],[-26.44302,39.4585037],[-25.8044186,39.65144],[-25.6553879,39.69328],[-25.25699,39.89225],[-24.9329681,40.1600723],[-24.7037773,40.4806328],[-24.5847969,40.8343964],[-24.5851612,41.19949],[-24.70681,41.55299],[-24.9438744,41.87233],[-25.28258,42.13
{"features":[{"geometry":{"coordinates":[[[-37.0655251,37.9886665],[-36.65665,38.0091171],[-36.23764,38.0286942],[-35.7953148,38.0542],[-35.3896027,38.0916],[-34.9871368,38.1276],[-34.5889168,38.1622467],[-34.1959419,38.1955757],[-33.8091927,38.2276573],[-33.4296455,38.25856],[-33.0582542,38.2883835],[-32.728466,38.3150063],[-32.4197044,38.3317375],[-32.1194153,38.3485374],[-31.828228,38.3655663],[-31.5349636,38.383358],[-31.243681,38.4034653],[-30.9529972,38.4266319],[-30.661665,38.453598],[-30.3685818,38.4851036],[-30.0728035,38.52187],[-29.7735233,38.56456],[-29.3705387,38.63489],[-29.0438118,38.71374],[-28.7170944,38.7974129],[-28.3905,38.8851738],[-28.0641575,38.9763069],[-27.7382336,39.07011],[-27.4129162,39.165905],[-27.0884285,39.26301],[-26.76503,39.36076],[-26.44302,39.4585037],[-25.8044186,39.65144],[-25.6553879,39.69328],[-25.25699,39.89225],[-24.9329681,40.1600723],[-24.7037773,40.4806328],[-24.5847969,40.8343964],[-24.5851612,41.19949],[-24.70681,41.55299],[-24.9438744,41.87233],[-25.28258,42.13
@nmr8acme
nmr8acme / OkHttp3Stack.java
Created October 6, 2016 20:59 — forked from alashow/OkHttp3Stack.java
An OkHttp backed HttpStack for Volley (okhttp3 version)
/**
* The MIT License (MIT)
*
* Copyright (c) 2015 Circle Internet Financial
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is