作者: ryan

98 篇文章

安装中国电信光猫
中国电信安装宽带允许自己自购光猫,现将光猫安装设置方法描述如下,全部以中兴光猫为例,在中兴F412和F420上实验通过。 将光纤口插入光猫的光纤口在光猫的任意一网口上连接笔记本或者电脑,找到光猫的默认终端配置地址,一般在光猫的外壳上有标识,例如:192.168.1.1设置电脑或笔记本的ip在光猫默认配置地址一致的子网内,比如上述192.168.1.…
Python simulate browser behavior without X
We can use python urllib, or python request library to help us download html page, and manually parse it to get what we expected. But sometimes it is difficult to handle front…
Install sanic on CentOS7
Why choosing sanic All tests were run on an AWS medium instance running ubuntu, using 1 process. Each script delivered a small JSON response and was tested with wrk using 100 …
Tornado Asynchronous Programming Gists
Asynchronous programming with Tornado Tornado is single threaded (in its common usage, although in supports multiple threads in advanced configurations), therefore any "b…
Tornado Celery integration
Scenario While implementing wxgigo project, I need create an agent which will receive the POST requests from Wechat server, then relay to AMQP broker. In the appserver side, c…
CORS in Golang
Background While I design wxgigo installer, I would like to get install configuration web via http, and then go through https to save install configuration into server, becaus…
python3.x asyncio study
How to convert sync codes to be async one Method1: create a future object define a callback function which will continue check future result is ready or not, future.set_result…
Setup wifi connection in terminal in CentOS7
Make sure NetworkManager supports wifi and manages the wireless device #nmcli d DEVICE    TYPE      STATE       CONNECTION wlp2s0    wifi      unmanaged    -- enp9so    ethern…