• go get files recursively using glob?

    golang官方的glob不能支持**代表递归 https://github.com/golang/go/issues/11862 https://github.com/driskell/log-courier/issues/285 mattn给了一个他自己写的第三方库https://github.com/mattn/go-zglob

  • 在mac系统vim中绑定command键

    只能在macvim中, 才能对commnad组合键做映射. 就是command+c 因为在CLI中, commnad键会被iterm/terminal等终端应用截获. Option也是需要一些额外的办法才能使用, 而且会有负作用.也是需要一些额外的办法才能使用. 参考http://stackoverflow.com/questions/9450905/how-to-bind-vim-through-tmux-to-cmd-key/9451636#9451636

  • 今日单词

    discrete Breaking this down into discrete steps /dɪˈskriːt; dɪ`skrit/ adj eparate; distinct 分离的; 截然分开的 discrete particles a series of discrete events

  • 今日单词

    rapidity Things are happening with machine-gun rapidity: Brexit, the Turkish coup, Islamist massacres in France, the surrounding of Aleppo, the nomination of Donald Trump. /rəˈpɪdətɪ; rə`pɪdətɪ/ n[U] 迅速 湍急 with...

  • mesos scheduler与master通讯

    用的是http, 但是需要长链接. 服务器返回“200 OK” status code with Transfer-Encoding: chunked. 所以如果一个Http库只能在链接close之后才解释, 这样的库不能用. 因为接下来的通讯需要用另外一个链接,我们叫做第二个链接. master收到请求后, 对第二个链接回复202. 然后把真正的响应回复到第一个长链接中.

  • go-unpacking-array-as-arguments

    command := strings.Split("service nginx reload") cmd := exec.Command(command[0], command[1:]...) err := cmd.Run()

  • golang中select是同步的

    glog.Info(data) select { case zevent := <-watch: glog.Info(zevent) } glog.Info(data) select 是同步的, 打印出zevent之后, 再打印后面的data

  • nginx中location的匹配规则

    官方资料见 http://nginx.org/en/docs/http/ngx_http_core_module.html#location location语法是这样的 location [ = | ~ | ~* | ^~ ] uri { ... } , []里面的东西代表可有可无. 举一个例子 location = / { [ configuration A ] } location...

  • elasticsearch在有节点脱离集群时删除索引

    如果节点A先脱离集群了, 这时候删除了某个索引. 然后节点A又再次加入集群, 会导致一个现象: 这个索引回来了, 但是无法分配到任何节点上.

  • /proc/meminfo

    从https://www.centos.org/docs/5/html/5.1/Deployment_Guide/s2-proc-meminfo.html全文复制 This is one of the more commonly used files in the /proc/ directory, as it reports a large amount of valuable information about the systems RAM usage. The following...