Skip to content

Instantly share code, notes, and snippets.

View heuermh's full-sized avatar

Michael L Heuer heuermh

View GitHub Profile
import java.awt.*;
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.event.*;
import rwmidi.*;
public final class SwingSliderMidi extends JPanel implements Runnable {
public SwingSliderMidi() {
super();
import java.awt.*;
import java.util.*;
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.event.*;
import oscP5.*;
public final class SwingSliderOsc extends JPanel implements Runnable {
public SwingSliderOsc() {
@heuermh
heuermh / issue-32046
Created September 2, 2014 17:25
Homebrew issue #32046
$ brew --config
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew.git
HEAD: 42050a0039b83f34b0793d60f7bb70f4a98d7229
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit sandybridge
OS X: 10.9.4-x86_64
Xcode: 5.1.1
CLT: 5.1.0.0.1.1396320587
$ mvn clean install -P scala-2.11
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.bdgenomics.adam:adam-core_2.11:jar:0.15.1-SNAPSHOT
[WARNING] 'artifactId' contains an expression but should be a constant. @ org.bdgenomics.adam:adam-core_${scala.artifact.suffix}:[unknown-version], /Users/mheuer/working/fnothaft-adam/adam-core/pom.xml, line 10, column 15
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.bdgenomics.adam:adam-apis_2.11:jar:0.15.1-SNAPSHOT
[WARNING] 'artifactId' contains an expression but should be a constant. @ org.bdgenomics.adam:adam-apis_${scala.artifact.suffix}:[unknown-version], /Users/mheuer/working/fnothaft-adam/adam-apis/pom.xml, line 11, column 15
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.bdgenomics.adam:adam-cli_2.11:jar:0.15.1-SNAPSHOT
2015-04-14 10:29:00 ERROR MetricsSystem:96 - Sink class org.apache.spark.metrics.sink.MetricsServlet cannot be instantialized
java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedConstructorAccessor56.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.apache.spark.metrics.MetricsSystem$$anonfun$registerSinks$1.apply(MetricsSystem.scala:173)
at org.apache.spark.metrics.MetricsSystem$$anonfun$registerSinks$1.apply(MetricsSystem.scala:167)
at scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:98)
at scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:98)
at scala.collection.mutable.HashTable$class.foreachEntry(HashTable.scala:226)
$ bash -x ./bin/adam-submit --jars adam-plugins_2.10-0.17.1-SNAPSHOT.jar -- plugin com.github.heuermh.adam.plugins.CountAlignments adam-core/src/test/resources/small.sam
+ set -e
+ DOUBLE_DASH=False
+ for ARG in '"$@"'
+ [[ --jars == \-\- ]]
+ for ARG in '"$@"'
+ [[ adam-plugins_2.10-0.17.1-SNAPSHOT.jar == \-\- ]]
+ for ARG in '"$@"'
+ [[ -- == \-\- ]]
+ DOUBLE_DASH=True
import oscP5.*;
import netP5.*;
// monome emulator size
static final int W = 32;
static final int H = 16;
// button size
static final int S = 16;
@heuermh
heuermh / gist:1211388
Created September 12, 2011 14:27
Adapt lower two bytes of int[] as byte[] for bitwise comparisons
/**
* Foo key analyzer, treats int[] as a byte[] for bitwise comparisons.
*/
private static class FooKeyAnalyzer implements KeyAnalyzer<AbstractFooKey> {
private static final int MSB = 1 << Byte.SIZE - 1;
private static int mask(final int bit) {
return MSB >>> bit;
}
@heuermh
heuermh / stomp_usbKeyboard
Created November 8, 2012 21:05
Teensyduino sketch for USB keyboard stomp pedal board
// stomp using usb keyboard
#include <Bounce.h>
// map buttons to key presses
String key0 = "0";
String key1 = "1";
String key2 = "2";
String key3 = "3";
String key4 = "4";
@heuermh
heuermh / stomp_usbMidi
Created November 8, 2012 21:05
Teensyduino sketch for USB MIDI stomp pedal board
// stomp using usb midi
#include <Bounce.h>
// midi channel
int channel = 1;
// cc values
int cc_off = 1;
int cc_on = 65;