Skip to content

Instantly share code, notes, and snippets.

View angelpinheiro's full-sized avatar

Ángel Piñeiro Souto angelpinheiro

  • Galicia
View GitHub Profile
@angelpinheiro
angelpinheiro / DateTimeConverter.java
Created October 14, 2014 19:03
Gson ISODateTime serializer/deserializer for Joda DateTime
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonParseException;
import com.google.gson.JsonPrimitive;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
import java.lang.reflect.Type;
import java.util.Date;
import org.joda.time.DateTime;
@angelpinheiro
angelpinheiro / runServer.sh
Created August 8, 2014 13:41
Execute maze visualizer example
#!/bin/sh
git clone https://github.com/angelpinheiro/hipster-maze-visualizer.git /tmp/hmvexample/
cd /tmp/hmvexample/
mvn package && mvn exec:java
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
background: #ececec;
}
</style>
<body>
@angelpinheiro
angelpinheiro / TestWebsocket.js
Created March 18, 2014 12:20
Test websocket
websocket = new WebSocket("ws://tec.citius.usc.es/servando/view/events");
websocket.onerror = function(evt) {console.log("Error", evt);};
websocket.onopen = function(evt) {console.log("Open", evt);};