Think before you speak, read before you think.

Author: jpuyy

  • kubectl config

    by

    in

    查看 contexts clusters kubectl config get-contexts kubectl config get-clusters kubectl config get-contexts -o name kubectl config get-users 删除 context cluster kubectl –kubeconfig=./KUBECONFIG_of_my config delete-context gke_europe-west2_123 kubectl –kubeconfig=./KUBECONFIG_of_my config delete-cluster gke_europe-west2_123 kubectl –kubeconfig=./KUBECONFIG_of_my config delete-user gke_europe-west2_123 kubectl via ssh tunnel https://blog.scottlowe.org/2020/06/16/using-kubectl-via-an-ssh-tunnel/#:~:text=To%20use%20kubectl%20via%20an,to%20reflect%20the%20tunnel%20details.

  • Local ubuntu server (yyhome) configurations

    by

    in

    * rtorrent * ubuntu lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.4 LTS Release: 20.04 Codename: focal $ hostname yyhome # cat sshd_config | grep -vE ‘^#|^$’ Include /etc/ssh/sshd_config.d/*.conf Port 22 Port 33 ChallengeResponseAuthentication no UsePAM yes X11Forwarding yes PrintMotd no AcceptEnv LANG LC_* Subsystem sftp /usr/lib/openssh/sftp-server PasswordAuthentication no Match…

  • godocc

    $ go install github.com/inancgumus/godocc $ which godocc /Users/jpuyy/go/bin/godocc # example $ godocc fmt printf package fmt // import “fmt” func Printf(format string, a …any) (n int, err error) Printf formats according to a format specifier and writes to standard output. It returns the number of bytes written and any write error encountered.

  • golang fmt

    https://pkg.go.dev/fmt # %g %g %e for large exponents, %f otherwise. Precision is discussed below. fmt.Printf(“%g feet is %g meters.\n”, feet, meters)

  • windows 11 VSCode Golang

    https://go.dev/dl/ download msi install package install path C:\Program Files\Go GOROOT GOPATH=C:\Users\username\go

  • ubuntu wsl2

    by

    in

    # install zsh $ sudo apt install zsh https://ohmyz.sh/#install snap not working $ uname -a Linux jpuyy-PC 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.4 LTS Release: 20.04 Codename: focal $ sudo snap install go –classic…