Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am maxekman on github.
  • I am maxekman (https://keybase.io/maxekman) on keybase.
  • I have a public key whose fingerprint is 79CE 51AB FF66 62E5 0190 D6D8 AD9F DE23 0305 FF85

To claim this, I am signing this object:

@maxekman
maxekman / kibana-dash.json
Last active August 29, 2015 14:16
Kibana dash
{
"title": "AGW",
"services": {
"query": {
"list": {
"0": {
"query": "level=debug",
"alias": "",
"color": "#BA43A9",
"id": 0,
@maxekman
maxekman / life_in_.swift
Last active August 29, 2015 14:06
An illustrated story about life in Swift
// Playground - noun: a place where people can play
// ^
// |
// 😄
// Run this in the Playground to see the story unfold!
import UIKit
class 😶 {
@maxekman
maxekman / logstash.conf
Last active August 29, 2015 14:06
MFX logstash config
input {
syslog {
type => syslog
port => 514
}
file {
type => otis
path => "/job/projects/common/var/log/otis/*.log"
#path => "/job/projects/common/var/log/otis/*dispatcher*.log"
@maxekman
maxekman / msgpack-rpc-client.go
Last active December 23, 2015 10:19
Example of how to use msgpack-rpc functionality in github.com/ugorji/go/codec
package client
import (
"fmt"
"net"
"net/rpc"
"github.com/ugorji/go/codec"
)
func main() {
@maxekman
maxekman / fsm_example.go
Created September 13, 2013 14:48
An example of how to use github.com/looplab/fsm
fsm := NewFSM(
"green",
Events{
{Name: "warn", Src: []string{"green"}, Dst: "yellow"},
{Name: "panic", Src: []string{"yellow"}, Dst: "red"},
{Name: "panic", Src: []string{"green"}, Dst: "red"},
{Name: "calm", Src: []string{"red"}, Dst: "yellow"},
{Name: "clear", Src: []string{"yellow"}, Dst: "green"},
},
Callbacks{
@maxekman
maxekman / tarjan_example.go
Created September 13, 2013 14:45
An example of how to use github.com/looplab/tarjan
graph := make(map[interface{}][]interface{})
graph["1"] = []interface{}{"2"}
graph["2"] = []interface{}{"3"}
graph["3"] = []interface{}{"1"}
graph["4"] = []interface{}{"2", "3", "5"}
graph["5"] = []interface{}{"4", "6"}
graph["6"] = []interface{}{"3", "7"}
graph["7"] = []interface{}{"6"}
graph["8"] = []interface{}{"5", "7", "8"}