Skip to content

Instantly share code, notes, and snippets.

@dsebban
dsebban / clean-git.md
Last active December 20, 2016 09:13
git rebase talk

Clean Git : Craft beautiful commits with git rebase

Development is an iterative process, you constantly change your code after better understanding of business/requirements. git rebase is the mean to do these changes.

git as a documentation tool

Devs hate to write docs: No more java docs, no more UML docs ... Only documenation that is left is ..........

val name = "daniel"
val one = 1
val oneAndTwoAsTuple = (1,2)
val oneAndTwoInAList = List(1,2)
scala> val name = "daniel"
name: String = daniel
scala> val one = 1
one: Int = 1
scala> val oneAndTwoAsTuple = (1,2)
oneAndTwoAsTuple: (Int, Int) = (1,2)
scala> val oneAndTwoInAList = List(1,2)
scala> val l: List = List(1,2,3)
<console>:12: error: type List takes type parameters
val l: List = List(1,2,3)
^
List("a") -> List[String] -> List -> ???
// value proper type first order type ???
trait WithMap[F[_]] {
}
T => List[T]
input output # implementations
a: A A 1
a: A, b: A A 2
as: List[A] List[A] little bit more
a: A Int a lot more!
@dsebban
dsebban / ammonite-console-resolver.scala
Last active August 6, 2018 09:14
Load fs2-kafka-client in ammonite shell using bintray resolver
amm
Loading...
Welcome to the Ammonite Repl 1.0.3-20-75e58ac
(Scala 2.12.4 Java 1.8.0_92)
If you like Ammonite, please support our development at www.patreon.com/lihaoyi
@ import coursier.core.Authentication, coursier.MavenRepository
import coursier.core.Authentication, coursier.MavenRepository
@ interp.repositories() ++= Seq(MavenRepository(
"http://dl.bintray.com/ovotech/maven"
@dsebban
dsebban / ammonite-script-fs2.sc
Created August 6, 2018 09:15
Import from bintray in an ammonite scala-script
import coursier.core.Authentication, coursier.MavenRepository
interp.repositories() ++= Seq(MavenRepository(
"http://dl.bintray.com/ovotech/maven"
))
@
import $ivy.`com.ovoenergy::fs2-kafka-client:0.1.13`