Skip to content

Instantly share code, notes, and snippets.

View padurean's full-sized avatar

Valentin Padurean (Ogg) padurean

View GitHub Profile
@padurean
padurean / Scala-SBT-Pass-JVM-Options-To-Test.md
Last active May 21, 2022 14:47
SBT, Scala - Pass JVM options when running tests

Use javaOptions sbt setting in Build.scala or build.sbt to pass jvm options to tests e.g.

  • statically:
javaOptions in Test ++= Seq("-Dconfig.file=conf/staging.conf")

or

@padurean
padurean / Play_WS_Standalone_HowTo.md
Last active July 8, 2016 14:25 — forked from cdimascio/Play_WS_Standalone_HowTo.md
PlatWS - How to use it in standalone Scala app

This gist provides a simple example of how to use Play's WS library in a standalone application (external to Play).

build.sbt - SBT build file that includes the WS library WSStandaloneTest.scala - A simple example that utilizes WS to invoke an HTTP GET request

@padurean
padurean / gist:241dfab0a83ab9125f14
Created June 29, 2015 10:12
Git commit message format - recommended by Linus Torvalds
Please write good git commit messages. A good commit message
looks like this:
Header line: explain the commit in one line (use the imperative)
Body of commit message is a few lines of text, explaining things
in more detail, possibly giving some background about the issue
being fixed, etc etc.
The body of the commit message can be several paragraphs, and
@padurean
padurean / AnyController.scala
Last active August 29, 2015 14:21
Play 2 request logging using composed actions
// Actions in controllers will be defined like this:
def create = ComposedAction.async(parse.tolerantJson) { implicit request => ... }
// instead of this:
def create = Action.async(parse.tolerantJson) { implicit request => ... }