- CQRS Journey: Free ebook from Microsoft (Print book available for purchase)
- Functional and Reactive Domain Modeling: A high level overview of how to build up domain models using free monads and interpreters.
- Reactive Microservices Architecture: Free booklet from Lagom and O'Reilly
- Reactive Messaging Patterns with the Actor Model: Applications and Integration in Scala and Akka
- Domain-Driven Design: Tackling Complexity in the Heart of Software
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
# My tmux configuration, partly based on https://github.com/wbkang/wbk-stow/blob/master/tmux-config/.tmux.conf | |
# Scroll History | |
set -g history-limit 50000 | |
# show messages for 4 seconds instead | |
set -g display-time 4000 | |
# set first window to index 1 (not 0) to map more to the keyboard layout | |
set-option -g renumber-windows on |
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
import akka.actor.Scheduler | |
import scala.concurrent.{ExecutionContext, Future, Promise} | |
import scala.concurrent.duration.FiniteDuration | |
object FutureHelper { | |
private val log = ScalaLogger.get(this.getClass) | |
/** | |
* Retry concurrently the async execution ''f'' every ''delay'' while no execution completes. | |
* Number of retries is bounded by ''maxSpeculativeExecutions''. |
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
class Nil | |
class Cons[X, Xs] | |
class First[List] { type X } | |
object First { | |
type Aux[List, X0] = First[List] { type X = X0 } | |
implicit val nilFirst: Aux[Nil, Nil] = ??? | |
implicit def consFirst[X0, Xs]: Aux[Cons[X0, Xs], X0] = ??? | |
} |
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
# Download and extract from https://www.gnu.org/software/solfege/ for example "solfege-3.22.2.tar.gz" | |
brew install librsvg texinfo pygtk timidity | |
export PATH=`brew --prefix`/opt/gettext/bin:$PATH | |
export PKG_CONFIG_PATH=`brew --prefix`/opt/libffi/lib/pkgconfig:$PKG_CONFIG_PATH | |
./configure | |
make |
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
import javax.crypto.Cipher; | |
import java.io.InputStream; | |
import java.security.*; | |
import java.util.Base64; | |
import static java.nio.charset.StandardCharsets.UTF_8; | |
public class RsaExample { | |
public static KeyPair generateKeyPair() throws Exception { | |
KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA"); |
keybase pgp pull <keybase.io user>
gpg --edit-key <keybase.io user>
> lsign
> save
git-crypt add-gpg-user <keybase.io user>
Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.
A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.
val square : Int => Int = x => x * x
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
/////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
//DESCRIPTION | |
// Modified Adalight protocol implementation that uses FastLED library (http://fastled.io) | |
// for driving 3-wire LED (WS2811, WS2812b, WS2813, Neopixel, ...) and 4-wire LED (e.g WS2801) strips. | |
// It uses FastLEDs parallel output feature to drive the LED stgrips which are arranged in upt to 8 substrips. | |
// It has been tested in the following arangement with Prismatik (V5.x only) and AmbiBox (http://www.ambibox.ru/en/index.php/Main_Page). | |
// With Abmbibox (V2.1.7) it seems to work better as the CPU load with Prismatik is quite high. On a fast machine, this will be probably not an issue. | |
// The official Ambibox download link seems to be dead. Version 2.1.7 can be found here: https://github.com/AmbiBox/kodi.script.ambibox/releases | |
// The file triggers a virus/malware warning. For me it seems like a false positive. Only install The main program as the rest |
Here is a fast explanation on this study for Freek to improve compile-time:
https://github.com/ProjectSeptemberInc/freek/blob/optim/cop/src/main/scala/CoproductK.scala#L14-L34
In Freek, Higher-Kinded Coproduct was based on Shapeless HList/Coproduct representation like:
sealed trait CoproductK[A] extends Product with Serializable
sealed trait CNilK[A] extends CoproductK[A]