Blog

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

  • gcp stackdriver

    gcp stackdriver

    https://cloud.google.com/logging/docs/routing/overview
    Can’t delete the _Default bucket.

    filter
    cheet sheet

    You can’t using > < to compare value in string, even they are numbers, using regex instead. ``` jsonPayload.duration=~".*[0-9][0-9][0-9][0-9]" ```

  • sftp chroot

    # cat /etc/ssh/sshd_config  | grep -vE '^#|^$'
    AuthorizedKeysCommand /usr/bin/google_authorized_keys
    AuthorizedKeysCommandUser root
    HostKey /etc/ssh/ssh_host_rsa_key
    HostKey /etc/ssh/ssh_host_ecdsa_key
    HostKey /etc/ssh/ssh_host_ed25519_key
    SyslogFacility AUTHPRIV
    PermitRootLogin no
    AuthorizedKeysFile      .ssh/authorized_keys
    PasswordAuthentication no
    ChallengeResponseAuthentication no
    GSSAPIAuthentication yes
    GSSAPICleanupCredentials no
    UsePAM yes
    X11Forwarding yes
    ClientAliveInterval 420
    UseDNS no
    AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
    AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
    AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
    AcceptEnv XMODIFIERS
    Subsystem sftp internal-sftp
    Match User user1
       ChrootDirectory /data/chroot/%u
       ForceCommand internal-sftp
       AllowTcpForwarding no
       X11Forwarding no
    

    https://serverfault.com/a/656756

  • 2021读书清单

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

    月份 技术书 非技术书
    2021-01-03 乡土中国
    2021-02-03 超越你的大脑
    2021-03-03 小家越住越大 1 2 3
    2021-05-03 原生家庭
    2021-08-16 Terraform: Up & Running
    2021-09-01 吃掉那只青蛙
    2021-09-10 十年一觉电影梦
    2021-11-10 李诞脱口秀工作手册
    2021-11-20 夜晚的潜水艇

     

  • alpine apk

    apk add bash curl tcpdump bind-tools busybox-extras