分类 other 下的文章

docker compose 配置文件可以很方便的配置和运行 docker 容器,但每次更新容器都需要运行多条命令。可以通过在 compose 文件中设置 watchtower 来定期自动拉取最新镜像并启动容器,同时可以配置删除旧镜像和容器。

阅读全文


通过 nginx 可以反代服务器指定文件,然后就可以在网页中查看文件内容。

核心就是通过 alias 关联文件路径。

配置文件如下:

location /test.log {
    alias /home/script/igd/app.log;

    default_type text/plain;
    add_header Content-Type "text/plain; charset=utf-8";
    charset utf-8;

    # 确保不会缓存内容
    add_header Cache-Control "no-cache, no-store, must-revalidate";
    add_header Pragma "no-cache";
    add_header Expires "0";
}

location 路径替换为需要的路径。alias 设置文件实际路径。


最近在使用 chatgpt 中发现 ios 端无法登录 app,网页端正常使用。提示信息为:

Something went wrong. You may be connected to a disallowed ISP If youare using VPN, try disabling it. Otherwise try a different Wi-Fi network or data connection。

经过查询发现是我的 vps 服务商只提供网页端 chatgpt 解锁,不支持 app 端。由于 chatgpt 服务也是通过 cloudflare 的 cdn 服务,所以通过将流量转发到 warp 来访问就可以解决问题。

首先需要在服务端安装官方的 warp 命令行工具:warp-cli。

官方教程:https://developers.cloudflare.com/warp-client/get-started/linux/

官方手动添加包仓库教程:https://pkg.cloudflareclient.com/#ubuntu

阅读全文



一键替换命令:

# 清华源
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

# 阿里源
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/

# 腾讯源
pip config set global.index-url http://mirrors.cloud.tencent.com/pypi/simple

# 豆瓣源
pip config set global.index-url http://pypi.douban.com/simple/

# 换回默认源
pip config unset global.index-url