this algorithm 10x faster than https://www.dotnetperls.com/duplicates-go and zero allocation
➜ api git:(master) ✗ go test -v -bench=. main_test.go
=== RUN TestSliceUniq
--- PASS: TestSliceUniq (0.00s)
BenchmarkSliceUniq-4 3000000 439 ns/op 0 B/op 0 allocs/op
BenchmarkRemoveDuplicates-4 500000 4599 ns/op 571 B/op 8 allocs/op
PASS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # Generates client and server certificates used to enable HTTPS | |
| # remote authentication to a Docker daemon. | |
| # | |
| # See http://docs.docker.com/articles/https/ | |
| # | |
| # To start the Docker Daemon: | |
| # | |
| # sudo docker -d \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function test(){ | |
| echo -n "Testing configuration. Please wait..." | |
| sleep 5 | |
| while true | |
| do | |
| echo -n "." | |
| sleep 10 | |
| done | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "reflect" | |
| ) | |
| type Foo struct { | |
| FirstName string `tag_name:"tag 1"` | |
| LastName string `tag_name:"tag 2"` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* ivan(a.t)mysqlab.net */ | |
| package main | |
| import ( | |
| "syscall" | |
| "os" | |
| "log" | |
| ) | |
| func daemon(nochdir, noclose int) int { |
As configured in my dotfiles.
start new:
tmux
start new with session name: