Skip to content

Instantly share code, notes, and snippets.

View ChenLingPeng's full-sized avatar
🎯
Focusing

Lingpeng Chen ChenLingPeng

🎯
Focusing
View GitHub Profile
func channalselectTest(){
runtime.GOMAXPROCS(2)
ch1 := make(chan int)
ch2 := make(chan int)
go pump(ch1,2)
go pump(ch2,5)
go suck(ch1,ch2)
time.Sleep(1e9)
}
sudo apt-get update
sudo apt-get install \
linux-image-extra-$(uname -r) \
linux-image-extra-virtual
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
@ChenLingPeng
ChenLingPeng / blacklist.yaml
Last active March 25, 2019 03:30
istio-demo
apiVersion: config.istio.io/v1alpha2
kind: listchecker
metadata:
name: whitelist
spec:
# providerUrl: ordinarily black and white lists are maintained
# externally and fetched asynchronously using the providerUrl.
overrides: ["v1", "v2"] # overrides provide a static list
blacklist: false
@ChenLingPeng
ChenLingPeng / .travis.yml
Created January 21, 2019 08:01 — forked from ryboe/.travis.yml
Example .travis.yml for Golang
# This is a weird way of telling Travis to use the fast container-based test
# runner instead of the slow VM-based runner.
sudo: false
language: go
# Force-enable Go modules. This will be unnecessary when Go 1.12 lands.
env:
- GO111MODULE=on
@ChenLingPeng
ChenLingPeng / audit-policy.yaml
Created December 2, 2019 08:18
audit-policy
apiVersion: audit.k8s.io/v1beta1 # This is required.
kind: Policy
# Don't generate audit events for all requests in RequestReceived stage.
omitStages:
- "RequestReceived"
rules:
- level: None
verbs: ["watch", "get", "list"]
# Log pod changes at RequestResponse level
- level: RequestResponse