Skip to content

Instantly share code, notes, and snippets.

View dt's full-sized avatar

David Taylor dt

View GitHub Profile
@dt
dt / stacktrace.txt
Created July 28, 2012 14:42
Play OAuth NPE stacktrace
play.core.ActionInvoker$$anonfun$receive$1$$anon$1: Execution exception [[NullPointerException: null]]
at play.core.ActionInvoker$$anonfun$receive$1.apply(Invoker.scala:134) [play_2.9.1.jar:2.0.2]
at play.core.ActionInvoker$$anonfun$receive$1.apply(Invoker.scala:115) [play_2.9.1.jar:2.0.2]
at akka.actor.Actor$class.apply(Actor.scala:318) [akka-actor.jar:2.0.2]
at play.core.ActionInvoker.apply(Invoker.scala:113) [play_2.9.1.jar:2.0.2]
at akka.actor.ActorCell.invoke(ActorCell.scala:626) [akka-actor.jar:2.0.2]
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:197) [akka-actor.jar:2.0.2]
Caused by: java.lang.NullPointerException: null
at java.io.Reader.<init>(Reader.java:61) ~[na:1.6.0_33]
at java.io.InputStreamReader.<init>(InputStreamReader.java:55) ~[na:1.6.0_33]
@dt
dt / temp_server.pde
Created August 31, 2012 18:50
Temp Server
#include <SPI.h>
#include <Ethernet.h>
#include <dht11.h>
dht11 DHT11 = dht11(D1, BUSA)
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
EthernetServer server(80);
void setup() {
delay(1000);
Hello,
I'm sorry about the problem you had with the delivery of your order. I understand the inconvenience on your part and this is definitely not what we want for our customer to experience.
I want to make things right for you so I've forwarded your feedback about USPS to our shipping department--I know they'll want to hear about your experience. We're aware that our choice of delivery services reflects on our business as a whole, and we appreciate your feedback.
Further, I want to compensate for this; so in case you'll place another order from our website, please have it via One Day Shipping and we will waive the shipping cost. Please make sure that the item is sold and shipped by Amazon or at least Fulfilled-by-Amazon.
One of our aims at Amazon.com is to provide a convenient and efficient service; in this case, we haven't met that standard. I'm truly sorry, and I hope you'll give us another chance in the future.
@dt
dt / rdio_ugly_bar
Created May 29, 2013 20:10
kill the ugly rdio bar
.Canvas_Blur canvas {
display: none !important;
}
.Canvas_Blur {
background-color: #ffffff !important;
height: 91px;
}
.App_PlayerFooter {
height: 70px !important;
}
@dt
dt / watcher.sh
Last active December 18, 2015 12:49
light-on-new-thing.sh
#!/bin/bash
echo 18 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio18/direction
echo 1 > /sys/class/gpio/gpio18/value
LAST=`curl -s https://api-davidtaylor-staging.foursquare.com/latest.id`
echo 0 > /sys/class/gpio/gpio18/value
sleep 2
echo 1 > /sys/class/gpio/gpio18/value
echo "waiting..."
@dt
dt / udpserver.java
Created August 4, 2013 16:53
UDP Echo Server
import java.io.*;
import java.net.*;
class UDPServer {
public static void main(String args[]) throws Exception {
if (args.length < 1) {
System.out.println("usage: java UDPServer <port>");
} else {
int listen = Integer.parseInt(args[0]);
try {
@dt
dt / lightup.sh
Created October 14, 2013 19:56
lightup script
#!/bin/bash
echo 18 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio18/direction
echo 1 > /sys/class/gpio/gpio18/value
LAST=`curl -s https://api-davidt-staging.foursquare.com/norep.id`
echo "`date` starting up..."
echo "`date` initial id: $LAST"
killfile=/opt/watcher.kill
scala> List(1, 2, 3).toSet()
[[syntax trees at end of typer]] // <console>
package $line3 {
object $read extends scala.AnyRef {
def <init>(): $line3.$read.type = {
$read.super.<init>();
()
};
object $iw extends scala.AnyRef {
def <init>(): type = {
com
foursquare
foo
client [fsthriftclient for 'foo']
server
bin [main method(s) and concrete bag]
concrete [implementation of services used in 'endpoint' or 'rpc']
endpoint
json
frontend [self-hosted/internal web pages]
### Keybase proof
I hereby claim:
* I am dt on github.
* I am davidtaylor (https://keybase.io/davidtaylor) on keybase.
* I have a public key whose fingerprint is C1C7 28C0 61A1 AF42 37E5 3469 769C 56D5 F1B4 6954
To claim this, I am signing this object: