Skip to content

Instantly share code, notes, and snippets.

@ibmendoza
ibmendoza / docker-gnatsd-cluster.org
Created July 18, 2016 05:55 — forked from wallyqs/docker-gnatsd-cluster.org
Docker GNATSD Cluster example

Docker GNATSD Cluster example

Below is an example of how to setup gnatsd cluster using Docker.

I have put 3 different configurations (one per gnatsd server) under a folder named conf as follows:

tree conf
@ibmendoza
ibmendoza / gist:3ec443f314bd35147e47
Created January 25, 2016 02:07 — forked from alexedwards/gist:4d20c505f389597c3360
Illustration of using httprouter and stack
package main
import (
"fmt"
"github.com/alexedwards/stack"
"github.com/julienschmidt/httprouter"
"net/http"
)
func main() {
One Many
Synchronous T/Try[T] Iterable[T]
Asynchronous Future[T] Observable[T]

Via Erik Meijer (video) and slides

####Examples:

@ibmendoza
ibmendoza / base.html
Last active November 14, 2015 05:57 — forked from gplume/base.html
httprouter vs. Gin - hijacked connection
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Chat</title>
<script src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
</head>