$ netstat -an | grep 3306
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
这样的就是3306端口只是在IP 127.0.0.1上监听,所以拒绝了其他IP的访问。
import asyncio | |
import datetime | |
import random | |
from fastapi import FastAPI | |
from fastapi.middleware.cors import CORSMiddleware | |
from fastapi.responses import StreamingResponse | |
app = FastAPI() |
version: "3" | |
services: | |
mysql5_5: | |
restart: always | |
container_name: mysql5_5 | |
command: | |
--lower_case_table_names=1 | |
--character-set-server=utf8mb4 | |
--collation-server=utf8mb4_general_ci | |
--max_allowed_packet=128M |
asdf plugin-add python https://gitee.com/bllli/asdf-python.git | |
# pyenv 使用gitee加速 | |
sed -i 's/https:\/\/github.com\/pyenv\/pyenv.git/https:\/\/gitee.com\/bllli\/pyenv.git/g' `grep 'https://github.com/pyenv/pyenv.git' -rl .asdf --include "*"` | |
sed -i 's/git:\/\/github.com\/pyenv\/pyenv.git/[email protected]:bllli\/pyenv.git/g' `grep 'git://github.com/pyenv/pyenv.git' -rl .asdf --include "*"` | |
# Python包使用华为云加速 | |
# https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tar.xz |
package main | |
import ( | |
"context" | |
"fmt" | |
"time" | |
) | |
func main() { | |
tr := NewTracker() |
// https://stackoverflow.com/questions/44399422/read-file-from-resources-folder-in-spring-boot/44399541 | |
// file path: /path/to/src/main/resources/config/sample.txt | |
import org.springframework.util.ResourceUtils; | |
import java.io.File; | |
import java.nio.file.Files; | |
File file = ResourceUtils.getFile("classpath:config/sample.txt") |
// ==UserScript== | |
// @name 去你大爷的 CSDN 全文阅读 | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description 把登录后查看全文阅读的那个啥玩意儿给干掉 | |
// @author laobubu | |
// @match http://blog.csdn.net/*/article/details/* | |
// @match https://blog.csdn.net/*/article/details/* | |
// @grant none | |
// ==/UserScript== |