分类: 未分类

66 篇文章

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…
Use Jinja2 as Tornado’s default template engine
There are two ways to use Jinja2 as Tornado's default template engine: Inherited from mixed TemplateRendering class, and rewrite tornados's render() function Set Jinja2 templa…
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…
Interrupting those pesky “uninterruptible” processes
Anyone whose dealt with NFS administration has sooner or later had to confront a downed server that results in a hoard of unkillable processes that build up waiting for the NF…