Blog

  • K8s lifecycle preStop for nginx pod

    Trigger pre stop, to let the nginx pod consume the transactions while no new incoming connections

    lifecycle:                                                              
              preStop:                                                              
                exec:                                                               
                  command:                                                          
                  - /bin/sh                                                         
                  - -c                                                              
                  - curl test.xxx.com/prestop-sleep --resolve test.xxx.com:80:127.0.0.1; sleep 60; /wait-shutdown
    
  • Fix chrome Managed by your organization

    Problem statement:
    It shows my chrome in my personal computer, I need to find out how to fix it.
    open chrome://management, I got `Your administrator can change your browser setup remotely. Activity on this device may also be managed outside of Chrome. Learn more`

    operations:
    1. clean up LaunchAgents
    command + shift + G

    /Library/LaunchAgents and ~/Library/LaunchAgents
    /Library/LaunchDaemons

    2. remove unused policies and flags
    chrome://policy and
    “`
    defaults delete com.google.Chrome AutoSelectCertificateForUrls
    “`
    3. reset flags
    chrome://flags then reset all

  • 2023读书清单

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

    月份 技术书 非技术书
    2023-02
    2023-02 活法
    2023-02 可塑的我
    2023-03 工作、消费主义和新穷人
    2023-04 Excellent Advice for Living
    2023-07 SRE运维解密 中国人的性格

  • HTTP OPTIONS

    HTTP 的 OPTIONS 方法 用于获取目的资源所支持的通信选项。客户端可以对特定的 URL 使用 OPTIONS 方法,也可以对整站(通过将 URL 设置为“*”)使用该方法。

    https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Methods/OPTIONS

    https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS

  • tests-always-included mo

    mo templating library for bash
    curl -sSL https://git.io/get-mo
    https://github.com/tests-always-included/mo