Skip to content

Instantly share code, notes, and snippets.

View tarsa's full-sized avatar
🇵🇱
Głód to najwyższy etap rozwoju komunizmu.

Piotr Tarsa tarsa

🇵🇱
Głód to najwyższy etap rozwoju komunizmu.
View GitHub Profile
@tarsa
tarsa / dependency_graph.scala
Last active June 10, 2018 11:48
Dependency graph using normal Scala code
// in test source directory
object LocalSetup { // for running app locally
private val localConfig = ???
val instance = new ApplicationSetup(Some(localConfig)).instance
}
// in main source directory
object ProductionSetup extends ApplicationSetup(None)
@tarsa
tarsa / FutSeq.scala
Created April 19, 2017 21:07
Poor man's Future sequencing sugar
package futseq
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.duration.Duration
import scala.concurrent.{Await, Future}
import scala.language.implicitConversions
object FutSeq {
sealed trait HList
@tarsa
tarsa / ReconnectingProxy.scala
Created August 6, 2016 21:55
ReconnectingProxy
package akka.stream
import akka.{Done, NotUsed}
import akka.stream.scaladsl.{Flow, Source}
import akka.stream.stage._
import akka.util.ByteString
import scala.concurrent.{Future, Promise}
final class ReconnectingProxy[T, M](