colima 设置不安全的注册表 & 加速 & Proxy
注册表 & 加速
参考:https://github.com/abiosoft/colima/issues/834
比起加速,代理更快
1 | 设置 |
Docker 代理
参考:https://github.com/abiosoft/colima/issues/294
1 | 设置 |
参考:https://github.com/abiosoft/colima/issues/834
比起加速,代理更快
1 | # 设置 |
参考:https://github.com/abiosoft/colima/issues/294
1 | # 设置 |
https://github.com/ccakes/nomad-pgsql-patroni
https://github.com/zalando/spilo
https://github.com/bitnami/containers/tree/main/bitnami/postgresql-repmgr
https://github.com/zalando/patroni/blob/master/docker-compose.yml
Patroni + HAProxy + Etcd + PgBouncer
https://github.com/vitabaks/postgresql_cluster
https://www.jianshu.com/p/2fd3f4096493
https://blog.csdn.net/fly910905/article/details/125291186
https://zhuanlan.zhihu.com/p/640147253
1 | peewee.OperationalError: (2013, 'Lost connection to MySQL server during query ([Errno 104] Connection reset by peer)') |
原因是 peewee 不会主动去重连数据库
https://github.com/coleifer/peewee/issues/1992
如果在事务中也不会主动链接可以用如下方式
https://github.com/coleifer/peewee/issues/2628
1 | try: |
1 | from peewee import SQL, fn |
注意这里的 MINUTE
必须使用 SQL
函数格式化,如:SQL("MINUTE")
Peewee
中本来是没有 JSONField
这个数据类型的,我们可以利用官方的扩展包
1 | from playhouse.mysql_ext import JSONField |
也可以通过自定义类型
或者 jsonfield
这个三方包完成
1 | from playhouse.shortcuts import model_to_dict |
1 | Data.delete().where( |
https://liyuyu.cn/post/synology-calibre-web-jour/
https://github.com/janeczku/calibre-web/blob/master/library/metadata.db
1 | docker create \ |
需要手动启动容器
1、web 或者 opds 下载图书 404
参考:https://github.com/gshang2017/docker/issues/233
想在 Mac
中优雅的开启和关闭 http_proxy
在 ~/.zshrc
中加入以下函数
1 | # on proxy |
1 | > onproxy |
最近在升级 hexo
各种包的版本,对于升级推荐使用 npm-check-updates
,这个包可以做所有 npm oudated
和 npm upgrade
能做的事情
1 | npm install -g npm-check-updates |
利用 ncu
检查包的版本,输出如下:
1 | > ncu |
upgrade package.json
1 | ncu -u |
install new versions
1 | npm install |
添加的 synocommunity
本来是没有问题的,最近发现没法显示相关组件,从新添加提示无效的位置
1 | sudo mv /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt.bak && sudo curl -Lko /etc/ssl/certs/ca-certificates.crt https://curl.se/ca/cacert.pem |
参考:can’t add community repo - “invalid location” error - problem solved
最近在使用 Caddy
的时候出现如下错误
1 | Jan 05 02:16:47 C20230104172971 caddy[3271]: HOME=/root |
在 Caddyfile
开头增加下面配置即可
1 | { |
首先找到 google.cn
在大陆可用的 IP
,可以利用下面 chinaz
https://ping.chinaz.com/google.cn
尽量找延迟低一点的 IP
修改 Host
,Windows
如:C:\Windows\System32\drivers\etc\hosts
将下面记录加入到 hosts
文件
1 | 180.163.151.162 translate.googleapis.com |
题外话:Chrome
翻译插件可以用火山翻译
,字节出品还比较好用