Skip to content

Instantly share code, notes, and snippets.

View ngauerh's full-sized avatar
🙍‍♂️
I may be slow to respond.

Ngauerh ngauerh

🙍‍♂️
I may be slow to respond.
  • Beijing, China
View GitHub Profile
class Meta做为嵌套类,主要目的是给上级类添加一些功能,或者指定一些标准
https://blog.csdn.net/weixin_42134789/article/details/80753051
@ngauerh
ngauerh / readme.txt
Created January 9, 2019 08:16 — forked from fqrouter/readme.txt
shadowsocks 公共代理的必要设置
good, 你已经有了一个自己的shadowsocks代理了,现在想要把这个代理公布出去给所有人分享。
但是没有两个小时,代理就没法使用了,为什么?因为你需要额外注意以下事项(以下步骤需要比较高的linux技能)
本文只关注于确保shadowsocks服务还“活着”,如果你希望让其跑得更快,请参考
https://github.com/clowwindy/shadowsocks/wiki/Optimizing-Shadowsocks
1、 shadowsocks的timeout设置
超时时间越长,连接被保持得也就越长,导致并发的tcp的连接数也就越多。对于公共代理,这个值应该调整得小一些。推荐60秒。
2、 检查操作系统的各种限制
对于openvz的vps,特别需要检查一下
django发生
ImportError: Module "users.backends" does not define a "EmailBackend" attrib
解决
在settings.py里添加AUTHENTICATION_BACKENDS = ['django.contrib.auth.backends.ModelBackend']
解决django imagefield 无法序列化
str(pw.avatar) 将之转化为str类型
cat /etc/issue 查看发行版本
cat /proc/cpuinfo 查看cpu相关信息,包括型号、主频、内核信息等
uname -a 查看版本当前操作系统内核信息
cat /proc/version 查看当前操作系统版本信息
查看磁盘: df -h
查看端口: lsof -i:
安装uwsgi出错 提示找不到 Python.h
安装对应python文件的python-dev
sudo apt-get install libpython3.6-dev
pip install uwsgi
git fetch --all
git reset --hard origin/master
git pull