I hereby claim:
- I am jeantil on github.
- I am jeantil (https://keybase.io/jeantil) on keybase.
- I have a public key whose fingerprint is 3350 5E9B D3AD 49B2 A0C3 F638 98EE BAAA A074 A594
To claim this, I am signing this object:
package libs.json | |
object JsonOperations { | |
import play.api.libs.json._ | |
def withDefault[A](key: String, default: A)(implicit writes: Writes[A]) = __.json.update((__ \ key).json.copyFrom((__ \ key).json.pick orElse Reads.pure(Json.toJson(default)))) | |
def copyKey(fromPath: JsPath,toPath:JsPath ) = __.json.update(toPath.json.copyFrom(fromPath.json.pick)) |
package scenarios | |
import org.specs2.mutable.Specification | |
import org.specs2.mock.Mockito | |
import play.api.test.{FakeApplication, PlaySpecification, WithApplication} | |
import scenarios.helpers.{TestGlobal, DemoUser, TestUserService} | |
import securesocial.core.providers.GoogleProvider | |
import securesocial.core.{EventListener, RuntimeEnvironment} | |
import securesocial.core.services.{HttpService, UserService, RoutesService} |
package helpers | |
object Generators { | |
private val epoch = new DateTime(0) | |
val nameGen = for { | |
head <- Gen.alphaUpperChar | |
size<- Gen.choose(1,10) | |
tail <- Gen.listOfN(size,Gen.alphaLowerChar) | |
} yield (head +: tail).mkString("") | |
} |
I hereby claim:
To claim this, I am signing this object:
package libs | |
import java.io.{ObjectInputStream, ByteArrayInputStream, ObjectOutputStream, ByteArrayOutputStream} | |
import java.util | |
import scala.concurrent.{Await} | |
import play.api.libs.iteratee.Enumerator | |
import play.modules.reactivemongo.ReactiveMongoPlugin |
package libs.mvc | |
import java.util.UUID | |
import play.api.libs.json.Json | |
import play.api.mvc._ | |
import play.api.libs.concurrent.Execution.Implicits.defaultContext | |
import play.api.Logger | |
import org.joda.time.DateTime |
"com.jsuereth" % "sbt-pgp" % "1.0.0" | |
|-> depends on "net.databinder" %% "dispatch-http" % "0.8.10" | |
|-> depends on "org.apache.httpcomponents" % "httpclient" % "4.1.3" | |
"de.heikoseeberger" % "sbt-groll" % "4.4.0" | |
|-> depends on "org.eclipse.jgit" % "org.eclipse.jgit" % "3.5.3.201412180710-r" | |
|-> depends on "org.apache.httpcomponents" % "httpclient" % "4.1.3" | |
"ohnosequences" % "sbt-s3-resolver" % "0.8.0" -> "0.12.0" | |
|-> depends on "com.amazonaws" % "aws-java-sdk" % "1.6.1" -> "1.7.13" |
package actors.browser | |
import akka.actor.{Terminated, Props, ActorLogging, Actor} | |
import akka.routing._ | |
import scala.collection.immutable.IndexedSeq | |
class RoundRobinFixedSizeActorPool(props:Props, nbActors:Int) extends Actor with ActorLogging{ | |
val resizer = DefaultResizer(nbActors, nbActors) | |
val routingLogic = RoundRobinRoutingLogic() |
The MIT License (MIT) | |
Copyright (c) 2014 Jean Helou | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
import scala.concurrent._ | |
import scala.concurrent.ExecutionContext.Implicits.global | |
import scala.util.Random | |
val range = (1 to 10).toList | |
val delays = range.map(_=>Random.nextInt(1000)) | |
val rangeDelays = range zip delays | |
val a = rangeDelays.map { | |
case(i,d) => Future { | |
Thread.sleep(d) |