Author: jpuyy

  • Local ArgoCD playground

    $ brew install argocd

    $ argocd version

    $ kubectl port-forward svc/argocd-server -n argocd 8080:443

    $ kubectl get secret argocd-initial-admin-secret -n argocd -o json | jq “.data | map_values(@base64d)”

    “` reset password
    # bcrypt(xxxx)=$2b$12$H5jWbxxxxxxxxxxxxxxx.3aaA2xLQY4iZHZgI.y
    kubectl -n argocd patch secret argocd-secret \
    -p ‘{“stringData”: {
    “admin.password”: “$2b$12$H5jWbxxxxxxxxxxxxxxx.3aaA2xLQY4iZHZgI.y”,
    “admin.passwordMtime”: “‘$(date +%FT%T%Z)’”
    }}’
    “`

    argocd login –insecure –username admin –password xxxx –grpc-web 127.0.0.1:8080

    cat ~/.argocd/config

    command line
    https://argo-cd.readthedocs.io/en/stable/user-guide/commands/argocd/

  • macOS 鼠标 触控板

    鼠标设置,tracking speed / 双击以及滚动速度调到离最快 两格

    触控板
    勾选 Tap to click
    Click => light
    Track Speed => Fast

    三指拖拽
    https://support.apple.com/en-us/HT204609

  • VSCode Notes

    https://code.visualstudio.com/docs/setup/mac

    # 尽量用快捷键
    command + shift + E 浏览打开的代码及文件目录 反复按可切换

    # Are you using a screen reader to operate VS Code? (word wrap is disabled when using a screen reader)

    # Golang env:
    Go to View menu; select **Command Palette**
    command + shift + p, type

    Go: install/update tools => select all

    Tools environment: GOPATH=/Users/yang.yang/go
    Installing 8 tools at /Users/yang.yang/go/bin in module mode.
    gopkgs
    go-outline
    gotests
    gomodifytags
    impl
    goplay
    staticcheck
    gopls

    # shell
    # Golang env:
    Go to View menu; select **Command Palette**
    command + shift + p, type
    shell
    _”Install ‘code’ command in PATH”_

    # preferences
    command + shift + p, type

    preferences

    # install Gitlens

    Extentions
    Code Runner

    # Set tab indentation
    Settings, search `Tab Size`, set to 4

    # Improve the word spell, grammarly
    https://marketplace.visualstudio.com/items?itemName=znck.grammarly

    # Set max line width alert: 80, 120
    “editor.rulers”: [80, 120]

    # Set Word Wrap
    Editor: Word Wrap, use `wordWrapColumn`
    Editor: Word Wrap Column 80

    # collapse all the folders in the explorer
    Command +

  • microsoft desktop client

    For mac user Install Microsoft Remote Desktop. https://docs.microsoft.com/en-us/windows-server/remote/remote-desktop-services/clients/remote-desktop-clients

    beta version

    https://install.appcenter.ms/orgs/rdmacios-k2vy/apps/microsoft-remote-desktop-for-mac/distribution_groups/all-users-of-microsoft-remote-desktop-for-mac

  • macOS 路由管理

    osx添加与删除静态路由

    sudo route -n add -net 10.10.1.0/24 10.10.1.2
    sudo route -n delete -net 10.10.1.0/24 10.10.1.2

    清除路由

    You need to flush the routes . Use route -n flush several times . Afterwards add your routes with route add. restart network

    print routes

    netstat -rn
    
  • Protected: shadowsocks docker

    This content is password-protected. To view it, please enter the password below.