Skip to content

Instantly share code, notes, and snippets.

@finn
finn / antirez.com-news-114.md
Created October 3, 2017 03:08
Streams: a new general purpose data structure in Redis. - <antirez>

<antirez>

Until a few months ago, for me streams were no more than an interesting and relatively straightforward concept in the context of messaging. After Kafka popularized the concept, I mostly investigated their usefulness in the case of Disque, a message queue that is now headed to be translated into a Redis 4.2 module. Later I decided that Disque was all about AP messaging, which is, fault tolerance and guarantees of delivery without much efforts from the client, so I decided that the concept of streams was not a good match in that case.

However, at the same time, there was a problem in Redis, that was not taking me relaxed about the data structures exported by default. There is some kind of gap between Redis lists, sorted sets, and Pub/Sub capabilities. You can kindly use all these tools in order to model a sequence of messages or events, but with different tradeoffs. Sorted sets are memory hu

@finn
finn / Jenkins
Created May 7, 2017 18:30 — forked from johnbuhay/Jenkins
Jenkins | Configurations done via init.groovy.d
This file used to name this gist.
@finn
finn / keybase.md
Last active September 25, 2016 19:07

Keybase proof

I hereby claim:

  • I am finn on github.
  • I am finnsmith (https://keybase.io/finnsmith) on keybase.
  • I have a public key ASAVKSAQXL9bQnBspHZE5XppHoLUt5lR1yWRNn-9vszkBQo

To claim this, I am signing this object:

@finn
finn / disqussion.md
Last active November 30, 2015 00:02 — forked from tknerr/disqussion
Restored comments from DISQUS discussion about the environment cookbook pattern: http://vialstudios.logdown.com/posts/166848-the-environment-cookbook-pattern

Torben Knerr

Nice post! Finally some clarification on the different interpretations of what an application, library or wrapper cookbook is :-)

I have one question about the environment cookbooks though: what if you have two different applications (e.g. my_face and your_face) requiring a different set of dependencies running in the same environment?

IMHO locking dependency versions and exposing the public recipes / attributes via metadata.rb is a great thing, but it should be doable on a finer-grained basis than environments, namely on a per application (e.g. my_face) basis. For this exact reason I'm not using chef environments to lock the dependency versions, but rather something like an "uber application cookbook" which combines the properties of an application cookbook and the locking and documentation of an environment cookbook.

@finn
finn / 00084.md
Created October 30, 2012 19:03
Wexelblat Disasters

00084: Viridian Disasters

Key concepts: Disaster databases, Greenhouse Effect, psychological operations tactics, anti-Green activism, Leipzig Declaration, Greenhouse denial organizations, exploding sewers, giant algae blooms

Attention Conservation Notice: It's very grim and morbid, and it goes on for 1,500 words.

...

static int fcgi_demux_response(server *srv, handler_ctx *hctx) {
/* ... */
int toread;
/* ... */
/*
* check how much we have to read
*/
if (ioctl(hctx->fd, FIONREAD, &toread)) {
/* we never get here */
/* NOTE: hctx->fd is the fd to the fastcgi process */
#!/opt/local/bin/perl
use CGI::Fast qw(:standard);
my $COUNTER = 0;
while (new CGI::Fast) {
print header;
print start_html("FastCGI Hello, world!");
print
p("Hello, world!"),