Skip to content

Instantly share code, notes, and snippets.

object Products {
import scala.language.higherKinds
case class Cat[A, B](name: A, age: B)
case class Dog(name: String, age: Int)
trait Product[P] {
type Fst
type Snd
@EnverOsmanov
EnverOsmanov / ResultDiscardCookieTest.scala
Created March 31, 2017 16:46
Test for PlayFramework developers guys
import org.junit.runner._
import org.specs2.mutable._
import org.specs2.runner._
import play.api.mvc.{Cookie, DiscardingCookie, Results}
import play.api.test._
/**
* Add your spec here.
* You can mock out a whole application including requests, plugins etc.
* For more information, consult the wiki.
@EnverOsmanov
EnverOsmanov / akka_vs_play.md
Created February 20, 2017 12:03
akka-http vs play-netty-server

2k was used as warmup

Projects used:

https://github.com/schmitch/performance

Hardware Client: MacBook Pro 11,3 - Intel(R) Core(TM) i7-4850HQ CPU @ 2.30GHz with a Broadcom NetXtreme Gigabit Ethernet Controller Network Switch: Consumer grade 5 Port Hardware Server: Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz (HT enabled)

import java.io.BufferedWriter
import java.nio.file.{Files, Paths}
import scala.collection.JavaConversions._
import scala.io.Source
/**
* Created by 4 on 21.01.2016.
*/
object TweetTweet {