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
docker run -v directory_binding --network parent_directory_default your_docker_image tests.sh |
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
version: '2.1' | |
services: | |
component-a: | |
image: "cmp-a" | |
networks: | |
- my_custom_network | |
component-b: | |
image: "cmp-b" |
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
version: '2.1' | |
services: | |
component-a: | |
image: "cmp-a" | |
ports: | |
- 9999:9999 | |
component-b: | |
image: "cmp-b" |
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
implicit class AnyLet[T](t: T) { | |
def let[R](f: T => R): R = f(t) | |
} |
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
val original = Pair(BigDecimal(1), "abc") | |
transformToZ(transformToY(transformToX(original))) |
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
val original = Pair(BigDecimal(1), "abc") | |
// Evolve the value and send it to the next chain | |
original.let { | |
transformToX(it) // evolve it as parameter to send to next let | |
}.let { | |
transformToY(it) // can be evolve to other type | |
}.let { | |
transformToZ(it) | |
} |
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
case class Family(people: List[Person]) | |
implicit val om: ObjectMatcher[Person] = | |
(left: Person, right: Person) => left.name == right.name | |
implicit val dd: Derived[Diff[List[Person]]] = | |
new Derived(Diff[Set[Person]].contramap(_.toSet)) |
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
case class Organization(managers: List[Person], workers: List[Person]) | |
implicit val d: Diff[Organization] = | |
Derived[Diff[Organization]].ignore(_.managers.each.name) | |
.ignore(_.workers.each.age) |
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
implicit modifiedDiff: Diff[Person] = Derived[Diff[Person]].ignore(_.name) |
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
val d: Diff[Person] = Diff[Person].ignore(_.name) |