Skip to content

Instantly share code, notes, and snippets.

@mcroydon
mcroydon / keybase.md
Created March 17, 2014 00:43
Keybase proof

Keybase proof

I hereby claim:

  • I am mcroydon on github.
  • I am mcroydon (https://keybase.io/mcroydon) on keybase.
  • I have a public key whose fingerprint is C765 426F 3BBA 6092 72CB 9EC5 3EF0 1933 64B0 BAAB

To claim this, I am signing this object:

[14:16:36] <rgarcia_> is there a reason why you can't start a serf agent and simultaneously tell it to join a cluster?
[14:16:56] <rgarcia_> seems awkward to have to run another cmd to tell it to join
[14:17:43] <Kyle> thought you could?
[14:18:41] • Kyle: looks
[14:19:20] m0hit (~mohit@208.66.30.174) joined the channel.
[14:19:27] <Kyle> heh, guess you can't
[14:20:05] <Kyle> rgarcia_: could use a member join event, look for you, and serf join then?
[14:20:06] <Kyle> *shrug*
[14:20:43] <jacques_> could open a GI for it
[14:20:46] <@mitchellh> rgarcia_ So I originally coded that in
@mcroydon
mcroydon / noflo.json
Created October 8, 2013 21:38
NoFlo Hello World with a never-ending network. View it at http://noflojs.org/noflo-ui/#example/6892206
{
"properties": {
"environment": {
"runtime": "html",
"src": "./preview/iframe.html",
"width": "300",
"height": "300",
"content": "<div id='content'></div>"
},
"name": "Hello World"

Context: I was asked for a list of interesting reading relating to "distributed databases, behavior under partitions and failures, failure detection." Here's what I came up with in about an hour.

For textbooks, "Introduction to Reliable and Secure Distributed Programming" is a superb introduction to distributed computing from a formal perspective; it's really not about "programming" or "engineering" but about distributed system fundamentals like consensus, distributed registers, and broadcast. Used in Berkeley's Distributed Computing course (and HT to @lalithsuresh) Book Site

Notes from courses like Lorenzo Alvisi's Distributed Computing class can be great.

There are a bunch of classics on causality, [Paxos](ht

@mcroydon
mcroydon / fingure.clj
Last active December 10, 2015 10:48 — forked from anonymous/fingure.clj
(ns fingure.core
(:gen-class))
(use 'lamina.core 'aleph.tcp 'gloss.core)
(defn response [query]
(println (str "Received a request for " (if (clojure.string/blank? query) "index" query) "."))
(if (clojure.string/blank? query)
"Greetings from the fingure finger daemon."
(str "Greetings from the fingure finger daemon.\r\nNo information about " query " found.")))
@mcroydon
mcroydon / finger.lua
Created March 24, 2012 21:49
Basic finger with Lua and Luasocket.
$ lua
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> local socket = require("socket")
> client = socket.tcp()
> client:connect("mit.edu", 79)
> client:send("\r\n")
> print(client:receive("*a"))
Student data loaded as of Mar 24, Staff data loaded as of Mar 24.
Notify Personnel or use WebSIS as appropriate to change your information.
@mcroydon
mcroydon / tcpfing.pas
Created February 10, 2012 16:52
A finger implementation in Pascal using Trumpet TCP in DOS. Retrieved from http://www.pld.ttu.ee/~priidu/library/net/trumpet.html
program TCPFing;
uses
DOS, TrumpTCP, Crt, StrTools;
CONST
NulAddr: TIPAddr = (S_B1:0; S_B2:0; S_B3:0; S_B4:0);
var Result: Byte;
TmpAddr: TIPAddr;
@mcroydon
mcroydon / sillyproto.go
Created January 12, 2012 00:01
Performance-oriented silly text-based protocol server in go.
package main
import (
"bufio"
"flag"
"fmt"
"io"
"log"
"net"
"net/textproto"
@mcroydon
mcroydon / finger.go
Created December 23, 2011 13:40
Simplest finger client possible in go.
package main
import (
"fmt"
"net"
"io/ioutil"
)
func main() {
// Create connection
@mcroydon
mcroydon / s3up.py
Created November 11, 2011 06:10 — forked from ryansch/s3up.py
Command-line s3 uploader that uses the MultiPart (chunked) S3 upload functionality to parallelize and speed up large file uploads.
#!/usr/bin/env python
# coding=utf-8
#
# s3up.py
# 2010-2011, Mike Tigas
# https://mike.tig.as/
#
# Usage:
# s3up filename
# Uploads the given file to the DEFAULT_BUCKET (see below)