Skip to content

Instantly share code, notes, and snippets.


Jonas Bonér jboner

View GitHub Profile
huntc /
Last active April 26, 2021 09:15
Actor thoughts
// Re-creates
// The messages
struct Greet {
whom: String,
reply_to: ActorRef<Greeted>,
struct Greeted {
calvinlfer / distributionflow.scala
Last active March 30, 2019 13:23
Akka Streams Flow that distributes messages (according to a hashing function) across sub-flows. The idea is to have ordered processing per sub-flow but parallel processing across sub-flows.
View distributionflow.scala
* Example based on numBuckets = 3
* --- bucket 1 flow --- ~mapAsync(parallelism)~ ---
* |------------------| / \|---------------|
* Open inlet[A] --- | Partition Fan Out| --- bucket 2 flow --- ~mapAsync(parallelism)~ -----| Merge Fan In | --- Open outlet[B]
* |------------------| \ /|---------------|
* --- bucket 3 flow --- ~mapAsync(parallelism)~ ---
umidjons /
Last active March 17, 2023 19:19
Download Audio from YouTube with youtube-dl

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track

wsargent / TracerBulletController.scala
Last active January 23, 2018 17:23
Supports tracer bullet dynamic logging
View TracerBulletController.scala
package controllers
import javax.inject._
import play.api.mvc._
class TracerBulletController @Inject() extends Controller {
private val logger = org.slf4j.LoggerFactory.getLogger("application")
benjchristensen /
Last active January 15, 2018 07:24
Regarding synchronous RESTful communication ...

Response to requiring more than the 77 characters left on Twitter.

DISCLAIMER: The quality of writing and thinking here is aligned with a Twitter conversation, not a blog post, presentation, or book ;-)

Synchronous RESTful communication between Microservices is an anti-pattern ... you seem to being saying that the Netflix architecture (hystrix, eureka, ribbon, ..) is broken ... hmm what would @benjchristensen say?

viktorklang / gbr.txt
Created June 30, 2015 08:43
shell alias for showing git branches sorted by last activity date
View gbr.txt
alias gbr='git for-each-ref --sort="-authordate:iso8601" --format=" %(color:green)%(authordate:iso8601)%09%(color:white)%(refname:short)" refs/heads'
gregoryyoung / gist:a3e69ed58ae066b91f1b
Created June 24, 2015 13:25
Event Sourcing as 3 functions.
View gist:a3e69ed58ae066b91f1b
f(events) -> state
match f(state, event) -> state
f(state, command) -> events
djspiewak /
Created March 22, 2015 19:55
Introduction to scalaz-stream

Introduction to scalaz-stream

Every application ever written can be viewed as some sort of transformation on data. Data can come from different sources, such as a network or a file or user input or the Large Hadron Collider. It can come from many sources all at once to be merged and aggregated in interesting ways, and it can be produced into many different output sinks, such as a network or files or graphical user interfaces. You might produce your output all at once, as a big data dump at the end of the world (right before your program shuts down), or you might produce it more incrementally. Every application fits into this model.

The scalaz-stream project is an attempt to make it easy to construct, test and scale programs that fit within this model (which is to say, everything). It does this by providing an abstraction around a "stream" of data, which is really just this notion of some number of data being sequentially pulled out of some unspecified data source. On top of this abstraction, sca

acolyer /
Last active March 9, 2023 23:42
Internet Scale Services Checklist

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?