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
<configuration> | |
<conversionRule conversionWord="coloredLevel" converterClass="play.api.Logger$ColoredLevel" /> | |
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | |
<encoder> | |
<pattern>%date - [%level] - from %logger in %thread %n%message%n%xException%n</pattern> | |
</encoder> | |
</appender> |
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 stuff = "stuff" + someString match { | |
case "" => "" | |
case s => " " + s | |
} |
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
[info] bar.json (2.0B) | |
[info] smart 0.2 ms | |
[info] jackson 1.6 ms | |
[info] jawn 0.6 ms | |
[info] bla2.json (41.9K) | |
[info] smart 6.4 ms | |
[info] jackson 13.8 ms | |
[info] jawn 12.8 ms | |
[info] bla25.json (1.8M) | |
[info] smart 117.2 ms |
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
if ( cond ) { | |
if (cond) { | |
"a" | |
} else { | |
"b" | |
} | |
} else if (cond) { | |
"c" | |
} else { | |
if (cond) { |
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
def forMonth(account: String, month: Timestamp) = { | |
val eom = add30Days(month) | |
for { | |
b <- Build if b.account === account && b.start_time > month && b.start_time < eom | |
} yield 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
implicit val PromiseInstance = new Monad[Promise] { | |
def point[A](a: => A) = Promise.pure(a) | |
def bind[A, B](fa: Promise[A])(f: A => Promise[B]) = fa.flatMap(f) | |
} |
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
package controllers | |
import play.api.mvc.Action | |
import play.api.mvc.Controller | |
import play.api.mvc.AsyncResult | |
import views.html.index | |
import play.api.libs.openid.OpenID | |
import play.api.libs.concurrent.Redeemed | |
import play.api.libs.concurrent.Thrown | |
import play.api._ |
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 q = (for { | |
b <- Build if b.account === account && b.start_time > som && b.start_time < eom | |
} yield b).groupBy(_.instance_size).map { | |
case (a, q) => (a, q.map(_.minutes).sum) | |
} |
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
16:06 ~/haskell/yesog $ cabal install unix-time | |
Resolving dependencies... | |
Configuring unix-time-0.1.5... | |
Failed to install unix-time-0.1.5 | |
cabal: Error: some packages failed to install: | |
unix-time-0.1.5 failed during the configure step. The exception was: | |
ExitFailure 127 |
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
searching for ghc in path. | |
found ghc at /usr/bin/ghc | |
("/usr/bin/ghc",["--numeric-version"]) | |
/usr/bin/ghc is version 7.4.1 | |
looking for tool "ghc-pkg" near compiler in /usr/bin | |
found ghc-pkg in /usr/bin/ghc-pkg | |
("/usr/bin/ghc-pkg",["--version"]) | |
/usr/bin/ghc-pkg is version 7.4.1 | |
("/usr/bin/ghc",["--supported-languages"]) | |
("/usr/bin/ghc",["--info"]) |