Linux 截图工具
之前一直用深度截图,昨天截图时突然发现截的图片有一个蓝色的边框,搜索了一下,并没有发现好的方法可以去掉这个边框,倒是发现
2019-04-08   schedule 48 s  
Ubuntu 18.04 Mac 风格主题
使用 Linux 系统已经很多年了,印象中 Linux 的界面一直都非常的丑,特别是 Gnome 系,总感觉缺少设计感,KDE 虽然好一点,但好的不多。 如果有
2019-04-07   schedule 2 min 8 s  
go 工具使用 tips
go build -x 列出 go build 过程中的所有命令执行过程,类似于 bash 的 -x 选项: ~$ go build -x WORK=/tmp/go-build044494183 mkdir -p $WORK/b001/ cat >$WORK/b001/importcfg.link << 'EOF' # internal packagefile github.com/runsisi/x-ctl=/home/runsisi/.cache/go-build/3e/3ee7302e3f925630f468ed6c8f38c1e690e11f0c35b1c1a1075859f9c4511cd2-d packagefile github.com/runsisi/x-ctl/cmd=/home/runsisi/.cache/go-build/7d/7d16050f610d368f82c74e767e92782e2a77e485c0252716d6d7212508c60b3e-d packagefile runtime=/usr/lib/go-1.12/pkg/linux_amd64/runtime.a packagefile fmt=/usr/lib/go-1.12/pkg/linux_amd64/fmt.a ... go tool 列出所有的 go
2019-04-03   schedule 2 min 47 s  
socks5 代理转 http(s) 代理
Shadowsocks 在本地创建的服务是一个 socks5 代理,Chrome 浏览器使用 SwitchyOmega 插件可以很方便的使用该代理,但绝大多数的 Linux 命令行程序都只支持 http(s) 代
2019-04-03   schedule 4 min 1 second  
go AST
Abstract syntax tree https://en.wikipedia.org/wiki/Abstract_syntax_tree Basic AST Traversal in Go https://zupzup.org/go-ast-traversal/ Understanding Go programs with go/parser https://medium.com/justforfunc/understanding-go-programs-with-go-parser-c4e88a6edb87
2019-03-29   schedule 4 s  
go hcl 解析
HCL 是 hashicorp 推出的一个配置语言,在 hashicorp 的产品,如 Consul、Terraform 中用作标准的配置语言,其语法结构有点类似于 nginx 的配
2019-03-28   schedule 4 min 51 s  
go struct tags
A struct tag is a string literal (because it has the string type) Key is an unquoted string literal Value is a quoted string literal Key and value are separated by a colon (:). A key together with a value, separated by the colon is called a “key value pair“ A struct tag
2019-03-28   schedule 59 s  
go 错误处理
Don’t just check errors, handle them gracefully https://dave.cheney.net/2016/04/27/dont-just-check-errors-handle-them-gracefully Stack traces and the errors package https://dave.cheney.net/2016/06/12/stack-traces-and-the-errors-package Error handling practices in Go https://banzaicloud.com/blog/error-handling-go/
2019-03-27   schedule 5 s  
type assersion vs type switch
Go 没有 C++ 中的重载和模板的概念,在某些情况下,可能会需要通过 interface{} 参数来实现类似的能力,对于 interface{} 类型的变量,不能直接使用类型转换
2019-03-26   schedule 1 min 28 s  
ALUA
由于 RBD exclusive lock 的关系,当前 Ceph iSCSI 网关的实现使用了显式的 ALUA 模式。 关于 ALUA(TPGS) 可以阅读如下链接: Target Port Group Support (TPGS) in the Solaris OS https://www.oracle.com/technetwork/server-storage/solaris/tpgs-support-136354.html ALUA http://www.pearsonitcertification.com/articles/article.aspx?p=2819032
2019-03-24   schedule 14 s