Skip to content

Instantly share code, notes, and snippets.

View adnxn's full-sized avatar
✌️
I may be slow to respond.

adnan adnxn

✌️
I may be slow to respond.
View GitHub Profile
@adnxn
adnxn / dump.go
Created May 16, 2020 22:15
dump golang object
import "encoding/json"
func dump(i interface{}) string {
s, _ := json.MarshalIndent(i, "", "\t")
return string(s)
}
grep -rhe "ACS Websocket connection closed for a valid reason" -e "ACS client starting websocket poll loop" /var/log/ecs |
sort |
tail -n +2 |
awk -F'Z' '{ gsub("-"," ",$1); gsub("T"," ",$1); gsub(":"," ",$1); print mktime($1)}' |
sort -n |
awk '{if(NR%2 == 0){print $1 - _n}; _n=$1}' |
sort -n
@adnxn
adnxn / issue-#820-stacktrace
Last active May 31, 2017 20:39
issue-#820-more-info
panic: Fail in goroutine after TestSteadyStatePoll has completed
goroutine 611 [running]:
panic(0x8875c0, 0xc042281530)
c:/go/src/runtime/panic.go:500 +0x1af
testing.(*common).Fail(0xc04216de00)
c:/go/src/testing/testing.go:412 +0x126
testing.(*common).FailNow(0xc04216de00)
c:/go/src/testing/testing.go:431 +0x32
testing.(*common).Fatalf(0xc04216de00, 0x945997, 0x24, 0xc0421dda40, 0x3, 0x3)
Sending build context to Docker daemon 8.704 kB
Step 1/7 : FROM microsoft/windowsservercore:latest
---> b4713e4d8bab
Step 2/7 : MAINTAINER Amazon Web Services, Inc.
---> Running in 6e2f6e8df2a8
---> f242bdb29ef8
Removing intermediate container 6e2f6e8df2a8
Step 3/7 : SHELL powershell -command
---> Running in 4b1111479147