zuul:
ignoredServices: '*'
host:
connect-timeout-millis: 20000
socket-timeout-millis: 20000
routes:
auth-service:
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" | |
| "io" | |
| "log" | |
| "net/http" | |
| "os" | |
| "strings" | |
| "sync" |
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" | |
| "math/rand" | |
| "sync" | |
| ) | |
| func main() { |
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
| ss -ltn # list out all the listening sockets | |
| ss -ltp # list out all the listening socketes and the related process name with pid | |
| ss -t4 state time-wait # list all Ipv4 tcp sockets that are in "time-wait" state | |
| # state list | |
| 1. established | |
| 2. syn-sent | |
| 3. syn-recv | |
| 4. fin-wait-1 | |
| 5. fin-wait-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
| # go help modules | |
| A module is a collection of related Go packages. | |
| Modules are the unit of source code interchange and versioning. | |
| The go command has direct support for working with modules, | |
| including recording and resolving dependencies on other modules. | |
| Modules replace the old GOPATH-based approach to specifying | |
| which source files are used in a given build. | |
| Preliminary module support |
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
| // Copyright 2009 The Go Authors. All rights reserved. | |
| // Use of this source code is governed by a BSD-style | |
| // license that can be found in the LICENSE file. | |
| // Deep equality test via reflection | |
| package reflect | |
| import "unsafe" |
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/sh | |
| # 1. delete pv, pv会变成terminating状态 | |
| kubectl delete pv [pv-name] | |
| # 2. delete pvc, pvc会变成terminating状态 | |
| kubectl delete pvc [pvc-name-related-to-pv] | |
| # 3. patch pvc to remove protection, 具体可以看这里:https://stackoverflow.com/questions/51358856/kubernetes-cant-delete-persistentvolumeclaim-pvc,然后pv和pvc就被干净删除了 | |
| kubectl patch pvc [pvc-name] -p '{"metadata":{"finalizers": []}}' --type=merge |
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
| ## for some distributions of Linix, like ubuntu 18.04 | |
| ## `curl` does not include `c-ares` module so that you cannot do `curl --dns-servers 8.8.8.0 www.example.com` | |
| ## you will get error message as below: | |
| ## curl: (4) A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision. | |
| # build curl from source code | |
| # You can do that with building `curl` from souce code. below is tested against ubuntu 18.04 | |
| # download the code from git repo | |
| git clone https://github.com/curl/curl.git && cd curl |
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
| Disassembly of section tc: | |
| tc_drop_tcp: | |
| 0: bf 16 00 00 00 00 00 00 r6 = r1 | |
| 1: b7 01 00 00 69 6f 6e 0a r1 = 175009641 | |
| 2: 63 1a f8 ff 00 00 00 00 *(u32 *)(r10 - 8) = r1 | |
| 3: 18 01 00 00 20 74 63 20 00 00 00 00 73 65 63 74 r1 = 8386658476233028640 ll | |
| 5: 7b 1a f0 ff 00 00 00 00 *(u64 *)(r10 - 16) = r1 | |
| 6: 18 01 00 00 45 6e 74 65 00 00 00 00 72 69 6e 67 r1 = 7453010373394067013 ll | |
| 8: 7b 1a e8 ff 00 00 00 00 *(u64 *)(r10 - 24) = r1 | |
| 9: b7 01 00 00 00 00 00 00 r1 = 0 |
OlderNewer