Skip to content

Instantly share code, notes, and snippets.

Avatar

opensas opensas

View GitHub Profile
@opensas
opensas / DateFormatter.scala
Created May 30, 2012
Play framework 2 Jerkson json serializer / deserializer for Date data type
View DateFormatter.scala
package formatters.json
import play.api.libs.json.Json.toJson
import play.api.libs.json.JsValue
import play.api.libs.json.Format
import java.util.Date
import java.text.SimpleDateFormat
object DateFormatter {
@opensas
opensas / status.scala
Created Dec 8, 2011
tiny little scala script to check for play documentation translated files, see http://www.dzone.com/links/first_steps_with_scala_say_goodbye_to_bash_scripts.html
View status.scala
#!/bin/sh
exec scala -savecompiled "$0" "$@"
!#
import java.io._
val docs = new File(".").listFiles
.filter(_.getName.endsWith(".textile")) // process only textile files
.map(new DocumentationFile(_))
@opensas
opensas / application.conf
Created Nov 5, 2011
Configure an h2 file database to a specific location
View application.conf
# by default, when db=fs is specified
# play stores the h2 database file at db/h2/play
# with this setting you can
# specify another location for the h2 file database
db.driver=org.h2.Driver
db.url=jdbc:h2:file:data/play;MODE=MYSQL
db.user=sa
db.pass=
@opensas
opensas / playframework .gitignore
Created Sep 4, 2011
playframework .gitignore file template
View playframework .gitignore
# Extracted from https://github.com/ulrich/macaron-factory/blob/master/.gitignore
# Ignore all dotfiles...
.*
# except for .gitignore
!.gitignore
# Ignore Play! working directory #
db
eclipse
log
You can’t perform that action at this time.