Skip to content

Instantly share code, notes, and snippets.

async def main():
coroutine1 = do_some_work(1)
coroutine2 = do_some_work(2)
coroutine3 = do_some_work(4)
tasks = [
asyncio.ensure_future(coroutine1),
asyncio.ensure_future(coroutine2),
asyncio.ensure_future(coroutine3)
]
@fzitou
fzitou / aria2.bat
Created October 20, 2018 02:45 — forked from aa65535/aria2.bat
Aria2的配置文件 & 启动脚本
:: 启动后需要保留窗口, 关闭窗口则结束进程
aria2c --conf-path=aria2.conf -D
@fzitou
fzitou / 验证中国身份证 前6位对应地区码
Created October 18, 2018 03:28 — forked from mayufo/验证中国身份证 前6位对应地区码
验证中国身份证 前6位对应地区码
var GB2260 = {
"110000": "北京市",
"110100": "北京市市辖区",
"110101": "北京市东城区",
"110102": "北京市西城区",
"110103": "北京市崇文区",
"110104": "北京市宣武区",
"110105": "北京市朝阳区",
"110106": "北京市丰台区",
"110107": "北京市石景山区",
@fzitou
fzitou / 正向代理和反向代理的区别.md
Created June 19, 2018 06:44
正向代理和反向代理的区别 [proxy, nginx]

正向代理:

正向代理

反向代理:

反向代理

两者的区别在于代理的对象不一样:正向代理代理的对象是客户端,反向代理代理的对象是服务端。 正向代理隐藏真实客户端,反向代理隐藏真实服务端。

@fzitou
fzitou / squid_https.md
Last active August 29, 2018 10:01 — forked from xjdrew/squid_https.md
[配置squid https代理] #squid

编译

通过ubuntuapt-get安装的squid没有启用ssl功能,需要手动编译。

编译squid步骤如下。

安装依赖及获取源代码

apt-get install openssl libssl-dev ssl-cert
apt-get source squid