Skip to content

Instantly share code, notes, and snippets.

View chrsblck's full-sized avatar

Chris Black chrsblck

View GitHub Profile
### Keybase proof
I hereby claim:
* I am chrsblck on github.
* I am chrisblack (https://keybase.io/chrisblack) on keybase.
* I have a public key ASAXes-ucqQIl9R_YtdBWgZyWAMRIaBVX3auemjUsXSQOwo
To claim this, I am signing this object:
@chrsblck
chrsblck / defs_yaml.go
Last active June 20, 2016 22:17
Read defs yaml
package main
import (
"fmt"
"io/ioutil"
"path/filepath"
"gopkg.in/yaml.v2"
)
@chrsblck
chrsblck / t.go
Created March 8, 2016 22:24
ucfg.Config example
func (m *MetricSeter) Setup(cfg *ucfg.Config) {
config := struct {
Hosts []string `config:"hosts"`
Network string `config:"network"`
MaxConn int `config:"maxconnections"`
}{}
if err := cfg.Unpack(&config); err != nil {
return err
}
@chrsblck
chrsblck / hash_test.pl
Last active December 2, 2015 18:26
hash test in perl
#!/usr/bin/perl
use strict;
use warnings;
use Benchmark qw/:all/;
use Digest::MD5 qw/md5 md5_hex/;
use File::Find;
use Cwd qw/abs_path/;