Skip to content

Instantly share code, notes, and snippets.

Joaquim Serafim joaquimserafim

Block or report user

Report or block joaquimserafim

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@joaquimserafim
joaquimserafim / gist:1159dc026447121ce13e
Last active Aug 29, 2015
set a vm with kafka and node.js
View gist:1159dc026447121ce13e
git clone git@github.com:joaquimserafim/vagrantfile-template.git vm_kafka_node
cd vm_kafka_node
IP="192.168.33.100" PROVISION="zookeeper kafka nodejs" vagrant up
// steps:
// 1 - donwload/cp ubuntu (trusty) box
// 2 - run vagrant
// 3 - update OS
// 4 - run the provision (default: htop & git) and will install zookeeper, kafka & node.js (n)
View install.md
View gist:69a58240a0c980252058
### Keybase proof
I hereby claim:
* I am joaquimserafim on github.
* I am quim (https://keybase.io/quim) on keybase.
* I have a public key whose fingerprint is 3BBF D03A E1ED BF97 92E3 F8E4 26D3 380F 8927 ED41
To claim this, I am signing this object:
View papers.md

(dominic: this list of papers was originally recommended to me by Brain Noguchi @bnoguchi, and was a great start to understanding distributed systems)

Here's a selection of papers that I think you would find helpful and interesting:

Time, Clocks, and the Ordering of Events in a Distributed System

The seminal paper about event ordering and concurrency. The important result is that events in a distributed system define a partially ordered set. The connection to what we're working on is fundamental, as this defines how to detect concurrent updates. Moreover, the chosen algorithm to turn the partially ordered set into a totally ordered set defines the conflict resolution algorithm.

http://research.microsoft.com/en-us/um/people/lamport/pubs/time-clocks.pdf

View gist:73423e1cfabaefcafa09
var inherits = require('util').inherits;
var EventEmitter = require('events').EventEmitter;
var debug = require('debug')('emitter');
var sliced = require('sliced');
function Dummy() {
EventEmitter.call(this);
}
inherits(Dummy, EventEmitter);
View gist:b5f70d2f6c01101c5fde
Colors Cheat-sheet
white : "\033[1;37m"
black : "\033[0;30m"
red : "\033[0;31m"
light_red : "\033[1;31m"
green : "\033[0;32m"
light_green : "\033[1;32m"
yellow : "\033[0;33m"
light_yellow : "\033[1;33m"
@joaquimserafim
joaquimserafim / gist:9633125
Created Mar 19, 2014
save pwd in terminal
View gist:9633125
#!/usr/bin/env node
var stdin = process.openStdin();
// get a password from the console & print stars while the user types
function setPassword () {
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.setRawMode(true);
You can’t perform that action at this time.