自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

清风湖畔 明月窗边

原创 Anaconda for Windows

Forget about ActivePython or stock installation. Use Miniconda is much easier. http://conda.pydata.org/miniconda.html

2014-06-18 11:19:37 4258 0

原创 Python, Gevent and Multicore

Yes half of the programmers in the world knows Python can't run on multiple cores because of the famous GIL. Half of the Pytho

2014-06-02 12:11:08 3997 0

原创 One Year at Vimbra

一年工作下来,做的事情不多,但还是改变了一些。 因为作为 Vimbra 公司里现在唯一一个正儿八经的资深工程师,以及中间夹带做了的 Meetisan 服务器,我花了一年的时间在 web 方面扩展视野。Redis, MongoDB, PostgreSQL, PHP, Python,...

2014-05-13 23:02:38 2579 0

原创 How to serve AJAX pages (Ember.js, Angular, etc) to Google's dummy bots?

There may / must be better ways but here we go. Recipes:  Headless browser component, e.g. PhantomJS [1] is the preferred case because it�...

2014-01-23 23:02:02 3412 0

原创 SSH ControlPersist rocks.

$ cat config ControlPath ~/.ssh/controlmasters/%r@%h:%p ControlMaster auto ControlPersist 60 By allowing "ControlPersist",  any ...

2013-09-22 17:20:42 3669 0

原创 Installing virtualenv under Anaconda on OSX

OS X 10.8 by default comes with python 2.7.2. For using iPython Notebook (http://ipython.org/notebook.html) I usually install anaconda (http://conti...

2013-09-16 17:34:55 3869 0

原创 PostgreSQL / GIST index require "LIMIT" clause to trigger the index.

When using PostgreSQL and POINT type / GIST indexing for location queries, "LIMIT" clause is required for correctly utilizing the GIST inde...

2013-09-03 11:07:22 2461 0

原创 URL redirection / building in WSGI app

Building an WSGI app with Flask with LinkedIn API access. The app runs fine in local dev environment but when put behind Nginx reverse proxy with HTT...

2013-06-24 03:31:35 2635 0

原创 [Unresolved] Webpy bug when using sessions with generator and normal function handlers

class count1: def GET(self): s.session.count += 1 return str(s.session.count) class count2: def GET(self): s.session.count += 1 yield str(...

2013-06-16 13:56:10 2747 0

原创 Tornado AsyncHTTPTestCase gotchas

Q: How to test session based scenarios (login, logout, @authenticated)? A: Need to handle cookie: parse Set-Cookie response headers and provide Cook...

2013-04-30 19:54:23 2959 0

原创 Configure PHP and Django (Python) to run on the same Apache site.

Answered one question regarding how to setup Django / PHP to run on top / behind Apache frontend.  I did the setup of Django using proxy_scgi. There...

2013-04-20 16:47:34 2756 0

原创 Detection of a buffer overrun

Value of one of the thread-argument variable has changed at some place, which is only detected when the program crashes. (gdb) p *a $7 = { host ...

2013-04-18 21:13:22 3084 0

原创 HTTP/1.1, protocol design, pySpeedtest client

So recently I've been writing HTTP/1.1 client side protocol parsing stuff. Twice. When I went through RFC2616, even shallow like I was doing ...

2013-04-15 23:38:34 2693 0

原创 TCP shutdown VS HTTP KeepAlive

Building an HTTP client for some performance testing purposes. Multiple sockets, I/O multiplexing, two threads. One sender pushing pipelined requests...

2013-02-23 23:08:49 2816 0

原创 IT 翻译是有多难?对 CSDN 翻译文的纠错

今天 Fenng 在微博上链接了 CSDN 的一篇翻译文 《GitHub历史上最糟糕宕机事故回放及反省》 http://weibo.com/1577826897/zdd2J1oh8 本着对 Fenng 品牌的信任,我就点去看了一下。 CSDN 译文开篇第一段是这样...

2013-01-06 16:21:30 3438 2

原创 Basic distinguish between web.py / flup and tornado web process handling model (TBC)

Tornado is known for its capability of handling concurrent connections with help of OS event triggering mechanisms like epoll and kqueue. Web.py is ...

2012-12-23 21:53:49 3412 0

原创 No way to generate HTML markup with data-link and helper functions in JsViews like in JsRender

I was using both Jsviews (https://github.com/BorisMoore/jsviews) and Jsrender (https://github.com/BorisMoore/jsrender), with of course jQuery and j...

2012-11-11 13:28:04 2927 0

原创 web.py multipart file handling

I'll have to admit that... it was so easy to use $_FILE for file uploading in PHP. Trying to switch to Python from PHP (for various reasons...

2012-11-08 00:24:47 2953 0

原创 Enable weak password in Ubuntu

WARNING: BAD PRACTICE! Here we go. Edit /etc/pam.d/common-password find the line password [success=1 default=ignore] pam_unix.so obs...

2012-11-05 14:11:30 3326 0

原创 Reflection on recent university project

Group reflections and conclusion Limitations in terms of structure, design, implementation The design and structure of this app generally fulfill...

2012-10-31 11:26:26 2629 0

原创 Retrospect on a recent university project

Group reflections and conclusion Limitations in terms of functionality The app is able to perform its main tasks to deliver and discover informat...

2012-10-31 11:21:50 932 0

原创 Android 2.3 WebView bug 之 position:fix

最近在 Android 2.3 上做一个小应用,native / web 混合,用了一个 WebView 做内容主要显示区域。用了 jQuery Mobile 的列表和内置的搜索功能。那个搜索框在列表最顶端,当列表向上卷动的时候,搜索框会跟随一起卷动出屏幕顶端。客户看了 demo,表示「这个东西很...

2012-10-27 18:43:17 5596 2

原创 Bash array iteration

#!/bin/bash OD=output URL=http://www.ug.it.usyd.edu.au/~ygao6590/ # T: threads t=( 1 2 3 ) #t=( 1 ) # F: files f=( "50k" "100k" ...

2012-09-26 12:32:02 928 0

原创 Proxy and site on same port with Apache 2.2

# sites-enabled/site NameVirtualHost *:80 ServerName site.com # sites-enabled/proxy #ServerName not important ProxyRequests On W...

2012-04-28 18:21:30 1041 0

原创 Mac Security Essentials, protecting yourself against Flashback virus

1、开启自动更新 2、禁用 Java Applet 插件 设置参考 Google Docs 文档

2012-04-11 16:15:42 694 0

原创 Linux container hand-crafted

目标: 快速建立环境用语测试 deb 包安装 / web 应用部署。 可参考 https://github.com/wolf0403/lvmvm 的 README  基础环境: Ubuntu Natty (11.04) server.  文件系统: 测试环境的快速部署依...

2012-01-24 16:33:45 1666 0

原创 Ubuntu Natty locale issue

Ubuntu Natty (11.04), debootstrap-ed chroot environment Running most commands would receive the following warning message: perl: warning: Setting...

2012-01-17 07:33:12 1012 0

原创 ssh_config 的选项启用顺序

<br />连接无线网络之后,需要从 ucpu0 主机做 ssh forward 连接代理才能访问外部网络。于是我在我的 ~/.ssh/config 里做了如下设置:Host * ProxyCommand connect-proxy -R both -4 -S localhost:...

2011-05-06 15:49:00 3754 0

原创 Virtualbox network setup with no public IP

VirtualBox 虚拟 NAT 网络的限制与解决方法。

2011-03-05 09:22:00 1929 0

原创 Getting ready for the cloud

I really think now people are getting ready for the Cloud, or Chome OS, to be specific.  Well, i just got a new toy, a new laptop. After getting fire...

2009-12-07 00:58:00 1349 0

原创 最强烈鄙视科迈!

原有域名kmip.net动态解析服务已经关闭。现在特开通免费二级域名测试服务器kmddns.com给用户免费测试使用,若是作为商业服务建议您购买我们的收费动态解析!原来传说中的“永久免费二级域名”是可以不经通知,瞬间取消的。 强烈鄙视科迈!!

2009-10-18 22:20:00 2574 1

原创 Trying out LVM2 on Ubuntu

Environment: Ubuntu 8.04 server LTS in VMware Partitioned with installation guide, whole with LVM Extra empty virtual disk 8GB added as second SCS...

2009-09-12 22:35:00 1367 1

原创 Python MySQLdb unicode

无数人写过 blog / post 关于这个问题,但我还是又重新解决了一遍。先公布答案。 1、MySQLdb 连接类型conn = MySQLdb.connect(..., use_unicode = True, charset = "utf8",)  2、cursor.fet...

2009-07-29 10:45:00 3702 1

原创 Now launching Advanced Linux Programming Chinese wiki site

Now launching Advanced Linux Programming zh_CN wiki for publishing, sharing and further developing the great book for Linux/C beginers. Please visit ...

2009-07-20 02:11:00 2959 5

原创 4000万的重量级闹剧

这次不是在美琪或者人艺,这次,我们把这出闹剧舞台搬到了国际新闻里。从OpenCV到CyberSitter,绿坝算是把国内IT人的脸丢了个精光。坐等看这大戏如何收场。 References:http://www.cse.umich.edu/~jhalderm/pub/gd/Analysis of t...

2009-06-16 00:44:00 1555 0

原创 Actions must be planned before carrying out!!

So the system yields that my / partition is full after I clone another Debian4 vm... and I just realized that I have been putting all the wastes on /...

2009-03-03 00:57:00 1193 2

原创 Server status. Good job, friend!

ryan@ubuntu-server:~$ uptime 01:25:05 up 48 days, 4:24, 1 user, load average: 0.11, 0.12, 0.09 Will be shutdown in prior to power outage on Monday.

2009-03-02 01:29:00 1040 0

原创 Disable ethernet device renaming upon system cloning for Linux

1. Specify static address in prototype systemmodify /etc/network/interfacesauto lo eth0iface lo inet loopbackiface eth0 inet static address 17...

2009-02-26 14:45:00 1332 0

原创 Netcraft brain-dead

中国Web Server QZHTTP极速上升- 新闻Linux时代- 开源、自由、共享 ...中国Web Server QZHTTP极速上升- 新闻新闻Linux 技术文档.linux.chinaunix.net/news/2009/02/25/1063236.shtml - 23小时前 - 类...

2009-02-26 12:35:00 1316 0

原创 Ubuntu 更新问题解决……靠!

前两天整理服务器硬盘,失手把一个正在运行的dhcp/ddns服务器虚拟机文件全部删除了。。还好三个星期一直没有重启 vmware,否则我家里的网络算是毁了。昨天例行巡检时候发现了问题,一身冷汗,准备重新 build-up 一个 ddns server。但是从 template clone 出来的 ...

2008-11-29 18:39:00 1229 0

提示
确定要删除当前文章?
取消 删除