This is a summary of the guidelines presented by Martin Odersky during his talk Scala with Style.
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 akka.actor.{Actor, ActorLogging, ActorSystem, Props} | |
import akka.event.Logging | |
import akka.routing.RoundRobinPool | |
import scala.concurrent.Await | |
import scala.concurrent.duration._ | |
object RouteeActor { | |
def props(): Props = Props[RouteeActor] | |
} |
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 akka.actor.{Actor, ActorIdentity, ActorLogging, ActorRef, FSM, Identify, Props, Stash, Terminated} | |
import scala.concurrent.duration.{Duration, _} | |
object RemoteActorProxy { | |
sealed trait State | |
case object Identifying extends State | |
case object Active extends State |
I hereby claim:
- I am lregnier on github.
- I am lregnier (https://keybase.io/lregnier) on keybase.
- I have a public key ASB1FV_t35RpiUaURaAugxtwNPDaSQZlhBUUjNFT4J1x5Ao
To claim this, I am signing this object:
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 akka.actor.{Actor, ActorLogging, ExtendedActorSystem, Extension, ExtensionId, ExtensionIdProvider} | |
import akka.pattern.pipe | |
import com.typesafe.config.Config | |
import scala.concurrent.Future | |
import scala.concurrent.duration.Duration | |
object ActorCaching { | |
case class SaveToCache(msg: Any, response: Any) | |
case class RemoveFromCache(msg: Any) |
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 akka.actor.{Actor, ActorSystem, Props} | |
import akka.testkit.{ImplicitSender, TestActorRef, TestKit} | |
import org.scalatest.WordSpecLike | |
import scala.concurrent.duration._ | |
class SynchronousVsAsynchronousSpec | |
extends TestKit(ActorSystem("synchronous-vs-asynchronous-spec")) | |
with ImplicitSender | |
with WordSpecLike { |
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.util.Date | |
import com.auth0.jwt.algorithms.Algorithm | |
import com.auth0.jwt.interfaces.DecodedJWT | |
import com.auth0.jwt.{JWT => Auth0JWT} | |
import com.typesafe.config.Config | |
import scala.util.Try | |
object JWT { |
Table of Contents