Most of programs will not accept an email using just @localhost as domain.
So, edit /etc/hosts
file to make the domain localhost.com point to your machine, including this content to the file:
127.0.0.1 localhost.com
Most of programs will not accept an email using just @localhost as domain.
So, edit /etc/hosts
file to make the domain localhost.com point to your machine, including this content to the file:
127.0.0.1 localhost.com
package main | |
import ( | |
"fmt" | |
"math" | |
"time" | |
) | |
// humanizeDuration humanizes time.Duration output to a meaningful value, | |
// golang's default ``time.Duration`` output is badly formatted and unreadable. |
/* | |
Parallel processing with ordered output in Go | |
(you can use this pattern by importing https://github.com/MarianoGappa/parseq) | |
This example implementation is useful when the following 3 conditions are true: | |
1) the rate of input is higher than the rate of output on the system (i.e. it queues up) | |
2) the processing of input can be parallelised, and overall throughput increases by doing so | |
3) the order of output of the system needs to respect order of input | |
- if 1 is false, KISS! |
go test -run=. -bench=. -benchtime=5s -count 5 -benchmem -cpuprofile=cpu.out -memprofile=mem.out -trace=trace.out ./package | tee bench.txt | |
go tool pprof -http :8080 cpu.out | |
go tool pprof -http :8081 mem.out | |
go tool trace trace.out | |
go tool pprof $FILENAME.test cpu.out | |
# (pprof) list <func name> | |
# go get -u golang.org/x/perf/cmd/benchstat | |
benchstat bench.txt |
#!/usr/bin/env bash | |
# Focus window from 1st argument or | |
# executes command from 2nd argument | |
wmctrl -ia $(wmctrl -l | grep -i ${1} | awk '{print $1}') || ${2} & |
Basic | |
===== | |
[Shift]+[Mod]+[Enter] - launch terminal. | |
[Mod]+[b] - show/hide bar. | |
[Mod]+[p] - dmenu for running programs like the x-www-browser. | |
[Mod]+[Enter] - push acive window from stack to master, or pulls last used window from stack onto master. | |
[Mod] + [j / k] - focus on next/previous window in current tag. |
package main | |
import "os" | |
func makeDirectoryIfNotExists(path string) error { | |
if _, err := os.Stat(path); os.IsNotExist(err) { | |
return os.Mkdir(path, os.ModeDir|0755) | |
} | |
return nil | |
} |
package main | |
import ( | |
"runtime" | |
"fmt" | |
"time" | |
) | |
func main() { | |
// Print our starting memory usage (should be around 0mb) |