Skip to content

Instantly share code, notes, and snippets.

@carlpulley
carlpulley / resilient-actors.scala
Last active August 5, 2017 12:15
Designing and Testing Resilient Actor Systems Code
object CountActor {
sealed trait CountActorMessages
case object Increment extends CountActorMessages
case object CurrentCount extends CountActorMessages
def props: Props = Props(new CountActor)
}
private class CountActor extends Actor {
import CountActor._
@carlpulley
carlpulley / InvariantConfig.scala
Last active February 10, 2017 07:45
Validating Typesafe Configuration Files
package cakesolutions.example
import cakesolutions.config._
import scala.concurrent.duration.FiniteDuration
import scala.util.Try
import shapeless._
object InvariantConfig {
case object NameShouldBeNonEmptyAndLowerCase extends Exception
case object ShouldNotBeNegative extends Exception
@carlpulley
carlpulley / scalaz-camel.patch
Last active December 23, 2015 04:29
Patch to build scalaz-camel-core against Scalaz 7, Scala 10.2 and Apache Camel 2.11
diff --git a/project/ScalazCamelBuild.scala b/project/ScalazCamelBuild.scala
index bf7b548..7a11532 100644
--- a/project/ScalazCamelBuild.scala
+++ b/project/ScalazCamelBuild.scala
@@ -6,7 +6,7 @@ object ScalazCamelBuild extends Build {
lazy val buildSettings = Seq(
organization := "scalaz.camel",
version := "0.4-SNAPSHOT",
- scalaVersion := "2.9.2"
+ scalaVersion := "2.10.2"