Skip to content

Instantly share code, notes, and snippets.

View manub's full-sized avatar

Emanuele Blanco manub

View GitHub Profile

Keybase proof

I hereby claim:

  • I am manub on github.
  • I am manub (https://keybase.io/manub) on keybase.
  • I have a public key ASBY1tA4yiwRTkfCLujbY6Vyo-cbpEvOn6YFFxVDusW2Bgo

To claim this, I am signing this object:

@manub
manub / main.scala
Last active October 16, 2016 19:17
Basic finch root endpoint
import com.twitter.finagle.Http
import com.twitter.finagle.param.Stats
import com.twitter.server.TwitterServer
import com.twitter.util.Await
import io.circe.generic.auto._
import io.finch._
import io.finch.circe._
object Main extends TwitterServer {
@manub
manub / test.scala
Last active July 19, 2016 21:56
EmbeddedKafka test for topic creation.
package net.manub.embeddedkafka
import java.util.Properties
import org.apache.kafka.clients.consumer.KafkaConsumer
import org.apache.kafka.clients.producer.{KafkaProducer, ProducerConfig, ProducerRecord}
import org.apache.kafka.common.serialization.{StringDeserializer, StringSerializer}
import org.scalatest.concurrent.{JavaFutures, ScalaFutures}
import org.scalatest.{Matchers, WordSpec}
@manub
manub / gist:c538fc636c8d623c9920
Last active February 29, 2016 09:19
Playing with SourceShape
import akka.actor.ActorSystem
import akka.stream.scaladsl.{Flow, GraphDSL, Sink, Source}
import akka.stream.{ActorMaterializer, SourceShape}
object Main extends App {
implicit val actorSystem = ActorSystem()
implicit val actorMaterializer = ActorMaterializer()
val source = Source.fromGraph(GraphDSL.create() { implicit builder =>
mockMvc = standaloneSetup(displayController)
.setCustomArgumentResolvers(new ServletWebArgumentResolverAdapter(new PageableArgumentResolver()))
// add any other configuration you need
.build();