# GPG public key

2021-09-13 01:10:59

AF86E15D73204987

-----BEGIN PGP PUBLIC KEY BLOCK-----

mDMEYOb02BYJKwYBBAHaRw8BAQdAQS60RzD6saInTSeNwKq045F/88ar+l1wFhl3
H+njVd60HWthbGx5ZGV2IDxrYWxseWRldkBnbWFpbC5jb20+iJQEExYKADwWIQT9
qXWFT/UcfLfFzEOvhuFdcyBJhwUCYOb02AIbAwULCQgHAgMiAgEGFQoJCAsCBBYC
AwECHgcCF4AACgkQr4bhXXMgSYfcOgD+MyhRsWxbu/h3mRpOX+fsFYZn3kL7ok5V
/gDbCN8xobsA/0G7lWeb965IafTuIaWpYEuQVEqMQsZ0K7nGAg4i7EYP
=4maa
-----END PGP PUBLIC KEY BLOCK-----

# Shadowsoks config

2021-09-13 01:09:59

{
    "server": "0.0.0.0",
    "server_port": 8388,
    "password": "password",
    "method": "aes-256-gcm"
}

# FastAPI Brotli bomb

2021-09-13 01:09:30

from fastapi import FastAPI
from fastapi.responses import Response

app = FastAPI()


@app.get("/")
def index():
    # mkdir -p public && dd if=/dev/zero bs=1M count=32768 | brotli -Z -o public/32GB.br
    with open("public/32GB.br", mode="rb") as file:
        data = b''.join(file.readlines())
    return Response(content=data, media_type="text/html", headers={"Content-Encoding": "br"})

# Prisma build command

2021-09-12 00:56:27

prisma db pull
prisma generate

# Ubuntu install Docker

2021-09-11 09:59:50

sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io

# Title

2021-09-11 09:52:32

我准备在这里放一些常用的命令,类似于 Gist。