Skip to content

Instantly share code, notes, and snippets.

View juanjovazquez's full-sized avatar

Juan José Vázquez juanjovazquez

  • Legálitas
  • España
View GitHub Profile
@juanjovazquez
juanjovazquez / AnyToCoproduct.scala
Last active September 27, 2016 10:45
Approach for casting Any to Shapeless Coproduct
/*
* Copyright 2016 TECNOLOGIA, SISTEMAS Y APLICACIONES S.L.
*/
import org.scalatest.FunSuite
import shapeless.{ CNil, Coproduct, Inl, Inr, Typeable, :+: }
import shapeless.syntax.typeable.typeableOps
class AnyToCoproduct extends FunSuite with AnyToCoproductTypeableInstances {
@juanjovazquez
juanjovazquez / monadt.scala
Created March 29, 2016 17:45
Translation of Raul Raja's article `FP for the average Joe - II - ScalaZ Monad Transformers` for using cats library instead of scalaz. @see http://bit.ly/1SkmOTe
/**
Translation of Raul Raja's article
`FP for the average Joe - II - ScalaZ Monad Transformers`
for using cats library instead of scalaz.
@see http://bit.ly/1SkmOTe
*/
package joe
@juanjovazquez
juanjovazquez / validation.scala
Created March 29, 2016 15:43
Translation of Raul Raja's article `FP for the average Joe - I - ScalaZ Validation` for using cats library instead of scalaz. @see http://bit.ly/1UzKBEW
/**
Translation of Raul Raja's article
`FP for the average Joe - I - ScalaZ Validation`
for using cats library instead of scalaz.
@see http://bit.ly/1UzKBEW
*/
package joe
@juanjovazquez
juanjovazquez / Quill.scala
Created February 26, 2016 09:19
Streaming to Cassandra with Quill and Akka Streams
package com.tecsisa.wr
import akka.actor.ActorSystem
import akka.stream.ActorMaterializer
import akka.stream.scaladsl.Source
import io.getquill._
import io.getquill.naming._
import scala.concurrent.ExecutionContext.Implicits.global