Blog

  • 2022读书清单

    目标30本书,单线程模式,切记不要并发,不要同时读多本书

    月份 技术书 非技术书
    2022-08 精准表达
    2022-10 冷血
    2022-10 被讨厌的勇气

  • home network

    home network monitoring

    router => switch => wireless ap 192.168.1.123
    \-=> wired 1000MB machine1 192.168.1.66
    \-=> wired 1000MB machine2 192.168.1.x

  • kubectl config

    查看 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

    * 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 user jpuyy address 192.168.1.0/24
    PasswordAuthentication yes

    https://www.speedtest.net/apps/cli

    $ apt list –upgradable

    # apt install mlocate

    2023-05-23

    upgrade from Ubuntu 20.04.6 LTS to 22.04.2 LTS
    Run ‘do-release-upgrade’ to upgrade to it.

    # do-release-upgrade

    Do you want to start the upgrade?

    4 packages are going to be removed. 112 new packages are going to be
    installed. 688 packages are going to be upgraded.

    You have to download a total of 702 M. This download will take about
    5 minutes with your connection.

    Installing the upgrade can take several hours. Once the download has
    finished, the process cannot be canceled.

    Continue [yN] Details [d]y

  • 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.