http://www.perkin.org.uk/posts/automated-virtualbox-smartos-installs.html
save the following as setup.sh and run it:
#!/bin/sh
#
# Configurables:
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) |
http://www.perkin.org.uk/posts/automated-virtualbox-smartos-installs.html
save the following as setup.sh and run it:
#!/bin/sh
#
# Configurables:
### 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: |
(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
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); |
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" |
#!/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); |