[Go] Golang 中信号(signal)处理 2020-09-07 golang 1243 words 3 mins read Golang 中信号(signal)处理 Go信号通知机制可以通过往一个channel中发送 os.Signal 实现。 使用 signal.Notify 注册要接收的信号。signal.Stop 取消监听 Read more...
[Go] Golang Zookeeper 客户端操作 2020-09-06 golang 1749 words 4 mins read Golang Zookeeper 客户端操作 golang zookeeper 常用客户端 go-zookeeper 文档说明 https://godoc.org/github.com/go-zookeeper/zk gozk 文档说明 https://wiki.ubuntu.com/gozk 连接zookeeper 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 package main import ( "fmt" "time" "github.com/go-zookeeper/zk" ) func main() { Read more...
[Linux] Socket 统计工具ss命令 2020-09-05 linux 1127 words 3 mins read ss 命令用来统计系统 Socket 网络信息 ss是Socket Statistics的缩写。 ss命令可以用来获取socket统计信息,它可以显示和netsta Read more...
[Git] git rebase 合并多个commit 2020-09-05 git 706 words 2 mins read git rebase 合并多个commit git rebase命令在另一个分支基础之上重新应用,用于把一个分支的修改合并到当前分支。 使用语法 1 2 3 4 5 git rebase [-i | --interactive] [options] [--exec Read more...
[Python] Learn python3 in one picture. 2020-09-03 python 172 words 1 min read Learn python3 in one picture. 离线版思维导图 示例 字典 1 2 3 4 5 ls = {s: len(s) for s in ["Python", "Javascript", "Golang"]} print(ls) sl = {v: k for k, v in ls.items()} print(sl) 装饰符 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 def log(f): def wrapper(): print("Hey log~") Read more...