Skip to content

Instantly share code, notes, and snippets.

View zackzhangkai's full-sized avatar
🏠
Working from home

zackzhangkai zackzhangkai

🏠
Working from home
View GitHub Profile
@zackzhangkai
zackzhangkai / k3s_helm_install.sh
Last active May 30, 2022 07:02 — forked from icebob/k3s_helm_install.sh
K3S + Helm installing
# Install K3S
curl -sfL https://get.k3s.io | sh -
# Copy k3s config
mkdir $HOME/.kube
sudo cp /etc/rancher/k3s/k3s.yaml $HOME/.kube/config
sudo chmod 644 $HOME/.kube/config
# Check K3S
kubectl get pods -n kube-system
@zackzhangkai
zackzhangkai / proxy.md
Created November 9, 2021 03:02 — forked from yougg/proxy.md
complete ways to set http/socks/ssh proxy environment variables

set http or socks proxy environment variables

# set http proxy
export http_proxy=http://PROXYHOST:PROXYPORT

# set http proxy with user and password
export http_proxy=http://USERNAME:PASSWORD@PROXYHOST:PROXYPORT

# set http proxy with user and password (with special characters)
// 在实例化一个变量之前,可以传入函数作用于它。pilot中的addFlags函数使用了类似“过滤器”的做法:
// NewPilotArgs constructs pilotArgs with default values.
func NewPilotArgs(initFuncs ...func(*PilotArgs)) *PilotArgs {
	p := &PilotArgs{}

	// Apply Default Values.
	p.applyDefaults()

	// Apply custom initialization functions.