This file contains 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 clone git clone https://github.com/akka/akka-http.git | |
cd akka-http | |
sbt ";project docs; paradox" | |
open docs/target/paradox/site/main/index.html |
This file contains 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 clone [email protected]:akka/akka.git | |
cd akka | |
sbt ";project akka-docs; paradox" | |
open akka-docs/target/paradox/site/main/index.html |
This file contains 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 data | |
import cats.Functor | |
import cats.Monad | |
import cats.syntax.either._ | |
final case class EitherOptionT[F[_], A, B](value: F[Either[A, Option[B]]]) { | |
def map[C](f: B => C)(implicit F: Functor[F]): EitherOptionT[F, A, C] = | |
EitherOptionT(F.map(value)(e => e.map(o => o.map(f)))) |
This file contains 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
@startuml | |
skinparam monochrome true | |
skinparam classFontSize 16 | |
skinparam classFontStyle "Regular" | |
skinparam classFontName "Gill Sans" | |
skinparam classAttributeFontSize 14 | |
skinparam classAttributeFontStyle "Regular" | |
skinparam classAttributeFontName "Gill Sans" |
This file contains 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 io.circe._ | |
import io.circe.parser._ | |
import io.circe.syntax._ | |
import akka.http.scaladsl.marshalling.{Marshaller, ToEntityMarshaller} | |
import akka.http.scaladsl.model.{ContentTypeRange, HttpEntity} | |
import akka.http.scaladsl.model.MediaTypes.`application/json` | |
import akka.http.scaladsl.unmarshalling.{FromEntityUnmarshaller, Unmarshaller} | |
import scala.concurrent.Future |
This file contains 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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Hello World</title> | |
</head> | |
<body> | |
<script src="node_modules/pixi.js/dist/pixi.min.js"></script> | |
<script src="index.js"></script> | |
</body> |
This file contains 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/bash | |
for i in `seq $1 $2`; do | |
echo Message $i | nc 127.0.0.1 9997 | |
sleep 1 | |
done |
This file contains 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 scalaz._ | |
import Scalaz._ | |
trait WarmUpScalaz { | |
private val warmMeUp = 1.success | |
} |
This file contains 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
// With Tie Fighter | |
(validNumberNel(keyJsOpt, _.toLongExact) |@| validNumberNel(valueJsOpt, _.toIntExact)) { | |
case (key, value) => Measurement(name, key, value) | |
} | |
// Without Tie Fighter | |
type V[T] = ValidationNel[String, T] | |
Apply[V].apply2[Long, Int, Measurement](validNumberNel(keyJsOpt, _.toLongExact), validNumberNel(valueJsOpt, _.toIntExact)) { | |
case (key, value) => Measurement(name, key, value) | |
} |
This file contains 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 java.io.File | |
import java.util.UUID | |
import akka.actor.ActorSystem | |
import akka.http.scaladsl.model.headers.Location | |
import akka.http.scaladsl.model.{HttpEntity, StatusCodes, HttpResponse} | |
import akka.stream.{FlowMaterializer, ActorFlowMaterializer} | |
import akka.http.scaladsl.Http | |
import akka.http.scaladsl.server.Directives._ | |
import akka.stream.io._ |