Skip to content

Instantly share code, notes, and snippets.

Peksa /
Created Jul 29, 2012
Codahale metrics with Play framework
package plugins;
import play.PlayPlugin;
import play.mvc.Http;
import play.mvc.Http.Request;
import play.mvc.Http.Response;
import play.mvc.Router.Route;
import play.vfs.VirtualFile;
import util.MetricsUtil;
Peksa / pushstate.html
Created Jan 29, 2012
pushState tests
View pushstate.html
<!DOCTYPE html>
<title>#{get 'title' /}</title>
<meta charset="UTF-8">
<script src="@{'/public/javascripts/jquery-1.7.1.min.js'}"></script>
<a href="#" id="home">Hem</a>
<a href="#" id="local">Lokal</a>
Peksa /
Created Jan 5, 2012
Custom JSON Binder
package misc;
import play.*;
import play.mvc.*;
import java.util.*;
import java.lang.reflect.*;
import java.lang.annotation.*;
Peksa /
Created Dec 29, 2011
Play base controller
public class Application extends Controller
// Normal controller actions here
You can’t perform that action at this time.