Skip to content

Instantly share code, notes, and snippets.

View akauppi's full-sized avatar
💭
Working on ... next generation

Asko Kauppi akauppi

💭
Working on ... next generation
View GitHub Profile
@trusche
trusche / statsd.md
Last active May 2, 2019 13:05
Installing graphite and statsd on OS X Yosemite

Prerequisites

  • Homebrew
  • Python 2.7
  • Git

Graphite

Install Cairo

There's an issue with cairo 14.x that results in the axis fonts on the graphs being HUUUUUGE. Downgrading to 12.6 helps:

@markrendle
markrendle / explanation.md
Last active July 3, 2022 07:56
Why I was previously not a fan of Apache Kafka

Update, September 2016

OK, you can pretty much ignore what I wrote below this update, because it doesn't really apply anymore.

I wrote this over a year ago, and at the time I had spent a couple of weeks trying to get Kafka 0.8 working with .NET and then Node.js with much frustration and very little success. I was rather angry. It keeps getting linked, though, and just popped up on Hacker News, so here's sort of an update, although I haven't used Kafka at all this year so I don't really have any new information.

In the end, we managed to get things working with a Node.js client, although we continued to have problems, both with our code and with managing a Kafka/Zookeeper cluster generally. What made it worse was that I did not then, and do not now, believe that Kafka was the correct solution for that particular problem at that particular company. What they were trying to achieve could have been done more simply with any number of other messaging systems, with a subscriber reading messages off and writing

@inanna-malick
inanna-malick / throttle.scala
Created December 3, 2014 15:06
Throttle a flow using Akka Stream's new FlowGraph DSL
val rate = 200 millis
def throttled[T]: Flow[T, T] = {
val tickSource = TickSource(rate, rate, () => () )
val zip = Zip[T, Unit]
val in = UndefinedSource[T]
val out = UndefinedSink[T]
PartialFlowGraph{ implicit builder =>
import FlowGraphImplicits._
in ~> zip.left ~> Flow[(T,Unit)].map{ case (t, _) => t } ~> out
@davidaurelio
davidaurelio / create.js
Created February 22, 2011 14:48
Constructor-less inheritance for ECMAScript 5
var BaseObject = {
create: function create() {
var instance = Object.create(this);
instance._construct.apply(instance, arguments);
return instance;
},
extend: function extend(properties, propertyDescriptors) {
propertyDescriptors = propertyDescriptors || {};