This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| As a ... | |
| I want ... | |
| so that ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git checkout newbranch | |
| git cherry-pick 612ecb3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.fasterxml.jackson.databind.{DeserializationContext, JsonDeserializer} | |
| import org.joda.time.{DateTimeZone, DateTime} | |
| import com.fasterxml.jackson.core.JsonParser | |
| import java.io.IOException | |
| class MicrosoftJsonDateDeserializer extends JsonDeserializer[DateTime] { | |
| val Pattern = """\/Date\((\d+)([-+]\d+)?\)\/""".r | |
| def deserialize(jsonParser: JsonParser, deserializationContext: DeserializationContext): DateTime = { | |
| val dateString = jsonParser.getText |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // I'm looking for a better solution for the time logging (preferable in a transparent way) | |
| private def logTime(message: String, promise: Future[Response]) = { | |
| // not 100% ok, request is already running | |
| // might even not be started yet | |
| val now = System.currentTimeMillis | |
| promise.onRedeem { response => | |
| val time = System.currentTimeMillis - now | |
| logger.info(message + " => " + response.status + " " + time + "ms " + response.body.length + "b") | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .settings{ | |
| routesImport += "se.radley.plugin.salat.Binders._", | |
| templatesImport += "org.bson.types.ObjectId" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| export PATH=/opt/play2:$PATH | |
| cd ~/server | |
| rundir=myproject | |
| repo=git@server:myproject.git | |
| temp=$rundir.buid.temp | |
| rm -rf $temp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| val fasterXmlJacksonVersion = "2.2.2" | |
| val appDependencies = Seq( | |
| "com.fasterxml.jackson.core" % "jackson-core" % fasterXmlJacksonVersion, | |
| "com.fasterxml.jackson.core" % "jackson-annotations" % fasterXmlJacksonVersion, | |
| "com.fasterxml.jackson.core" % "jackson-databind" % fasterXmlJacksonVersion, | |
| "com.fasterxml.jackson.module" %% "jackson-module-scala" % fasterXmlJacksonVersion | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| implicit val pkWrites = new Writes[Pk[Long]] { | |
| def writes(pk: Pk[Long]): JsValue = { | |
| pk.toOption match { | |
| case Some(value) => JsNumber(value) | |
| case None => JsNull // TODO check if correct | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mvn clean test -Dmaven.surefire.debug -Dtest=com.bla.MyTest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ./android list sdk --all | |
| ./android update sdk --no-ui --all --filter 87,81,1,2,3,82,tool,platform-tool |