Golang's package expvar exp oses var iables via HTTP. Operations on the exposed varibles are atomic. It can be used for the purpose of web page ana ...
~/.config/sxhkd/sxhkdrc file # # wm independent hotkeys # # terminal emulator alt + Return gnome-terminal # program launcher alt + space dme ...
Follow the instructions descibed in bspwm for dummies and https://github.com/baskerville/bspwm/wiki to install bspwm. Install dmenu. sudo apt-get ins ...
imagemagick software suite is used to processing images on Linux. It can be used to capture screen as well. $ sudo aptitude install imagemagick To ca ...
x ^ 0s = x x & 1s = x x & x = x x | x = x x | 0s = x x ^ 1s = ~x x ^ x = 0s x & 0s = 0s x | 1s = 1s a ^ b ^ a = b a ^ b ^ b = a Shifting ...
Interface in Go is a type which provides a way to specify the behavior of objects: if something can do this, then it can be used here. So interface is ...
RPC server registers two paths ( /_goRPC_ and /debug/rpc ) and their handlers as HTTP server. The handler of /debug/rpc handles the http requests and ...
This is an example that access exported members from a unexported struct. // pk/pk.go package pk type point struct { X, Y int } func NewPoint(x, ...
1. strings.Reader func NewReader(s string) *Reader 2. bytes.Buffer implements io.Reader, io.Writer interface. func NewBuffer(buf []byte) *Buffer fun ...
func SHA1(s string) []byte { h := sha1.New() io.WriteString(h, s) v := h.Sum(nil) ...
init function is executed before main function and after all global variable declarations have evaluated (including the varibles and init functions de ...
Preflight Request, According to the definition on MDN , "A CORS preflight request is a CORS request that checks to see if the CORS protocol is underst ...
On Linux system, ports below 1024 are reserved for programs with root privilege. There are several ways to allow regular users to bind these privileged ...
As stated in The Effective Go : "Slices hold references to an underlying array, and if you assign one slice to another, both refer to the same array. I ...
You can use "docker save" command to save a docker image to file. docker save -o </path/to/filename> <image_name> You can also load a docker image f ...
In Virtualbox guest, open setting->network setting->port forwarding, Add a new Rule: change the "Host port" to the port you want to use as forwarding, ...
看到 网上有一篇文章 讲如何使用direnv管理GOPATH变量, 很有用。 sudo aptitude install direnv echo 'eval "$(direnv hook bash)"' >> ...
| Newer |