自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

清风湖畔 明月窗边

  • 博客(109)
  • 收藏
  • 关注

原创 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 4572

原创 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 4274

原创 One Year at Vimbra

一年工作下来,做的事情不多,但还是改变了一些。因为作为 Vimbra 公司里现在唯一一个正儿八经的资深工程师,以及中间夹带做了的 Meetisan 服务器,我花了一年的时间在 web 方面扩展视野。Redis, MongoDB, PostgreSQL, PHP, Python, Clojure,很多东西我开始尝试上手去用。用 DistroWatch 的话说,put the fu

2014-05-13 23:02:38 2831

原创 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's 1) v8, 2) lightweight, comparing to the next choinc

2014-01-23 23:02:02 3629

原创 SSH ControlPersist rocks.

$ cat config ControlPath ~/.ssh/controlmasters/%r@%h:%pControlMaster autoControlPersist 60By allowing "ControlPersist", any connected ssh session could quit (without this, the first ses

2013-09-22 17:20:42 3988

原创 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://continuum.io/downloads) in my home dir right away so I h

2013-09-16 17:34:55 4087

原创 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 index.CREATE TABLE points ( name varchar(40) NOT NULL, ty

2013-09-03 11:07:22 2616

原创 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 HTTPS, all redirections and LinkedIn callbacks fails w

2013-06-24 03:31:35 2814

原创 [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(s.session.count)With above two handlers diffe

2013-06-16 13:56:10 2931

原创 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 Cookie request headers.https://gist.github.com/wolf04

2013-04-30 19:54:23 3191

原创 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 are other ways like mod_wsgi but using proxy_* at

2013-04-20 16:47:34 2905

原创 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 = 0x0, port = 0, h_ent = 0x7fff5fbf6f10, r

2013-04-18 21:13:22 3393

原创 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 (merely picking bits that I need to know to get my stuff

2013-04-15 23:38:34 2895

原创 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 and one receiver dragging all server responses.

2013-02-23 23:08:49 3007

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

今天 Fenng 在微博上链接了 CSDN 的一篇翻译文 《GitHub历史上最糟糕宕机事故回放及反省》http://weibo.com/1577826897/zdd2J1oh8本着对 Fenng 品牌的信任,我就点去看了一下。CSDN 译文开篇第一段是这样的……开源中国社区翻译了该博文的部分内容,但可惜漏掉了不少重要内容,CSDN整理并编译了余下的部分

2013-01-06 16:21:30 3757 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 a web framework for Python. It relies on other serv

2012-12-23 21:53:49 3623

原创 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 jQueryMobile for the interface. The custom tag provi

2012-11-11 13:28:04 3207

原创 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 including shared configuration between web and backgrou

2012-11-08 00:24:47 3135

原创 Enable weak password in Ubuntu

WARNING: BAD PRACTICE!Here we go.Edit /etc/pam.d/common-passwordfind the linepassword [success=1 default=ignore] pam_unix.so obscure sha512The "obscure" option here disables sim

2012-11-05 14:11:30 3584

原创 Reflection on recent university project

Group reflections and conclusionLimitations in terms of structure, design, implementationThe design and structure of this app generally fulfills its requirements, capable of providing informatio

2012-10-31 11:26:26 2799

原创 Retrospect on a recent university project

Group reflections and conclusionLimitations in terms of functionalityThe app is able to perform its main tasks to deliver and discover information on campus. However there are still limitation

2012-10-31 11:21:50 1116

原创 Android 2.3 WebView bug 之 position:fix

最近在 Android 2.3 上做一个小应用,native / web 混合,用了一个 WebView 做内容主要显示区域。用了 jQuery Mobile 的列表和内置的搜索功能。那个搜索框在列表最顶端,当列表向上卷动的时候,搜索框会跟随一起卷动出屏幕顶端。客户看了 demo,表示「这个东西很好啊,要是能停留在顶部就更好了」。之后发生的事情如下:1、设置 position:fix 以及修正

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

原创 Bash array iteration

#!/bin/bashOD=outputURL=http://www.ug.it.usyd.edu.au/~ygao6590/# T: threadst=( 1 2 3 )#t=( 1 )# F: filesf=( "50k" "100k" "200k" )#f=( "50k" )# S: timeout (secs)s=( 5 10 15 20 25 )#s=( 5 )

2012-09-26 12:32:02 1045

原创 Proxy and site on same port with Apache 2.2

# sites-enabled/siteNameVirtualHost *:80 ServerName site.com# sites-enabled/proxy #ServerName not important ProxyRequests OnWhen using Debian style sites-enabled, make sure Pro

2012-04-28 18:21:30 1232

原创 Mac Security Essentials, protecting yourself against Flashback virus

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

2012-04-11 16:15:42 807

原创 Linux container hand-crafted

目标:快速建立环境用语测试 deb 包安装 / web 应用部署。可参考 https://github.com/wolf0403/lvmvm 的 README 基础环境:Ubuntu Natty (11.04) server. 文件系统:测试环境的快速部署依赖 LVM (Logical Volume Management) 。安装宿主系统方法不限,留足够硬盘

2012-01-24 16:33:45 1834

原创 Ubuntu Natty locale issue

Ubuntu Natty (11.04), debootstrap-ed chroot environmentRunning most commands would receive the following warning message:perl: warning: Setting locale failed.perl: warning: Please check that yo

2012-01-17 07:33:12 1163

原创 ssh_config 的选项启用顺序

<br />连接无线网络之后,需要从 ucpu0 主机做 ssh forward 连接代理才能访问外部网络。于是我在我的 ~/.ssh/config 里做了如下设置:Host * ProxyCommand connect-proxy -R both -4 -S localhost:8888 %h %p<br />以便 ssh 到任何其他主机都可以走本地 connect-proxy 工具打开的端口 8888 连接远程主机。<br /> <br />默认习惯,我的 .ssh/config 的顺序是 *

2011-05-06 15:49:00 4335

原创 Virtualbox network setup with no public IP

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

2011-03-05 09:22:00 2068

原创 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 firefox running on it, I realized I need nothing to

2009-12-07 00:58:00 1479

原创 最强烈鄙视科迈!

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

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

原创 Trying out LVM2 on Ubuntu

Environment:Ubuntu 8.04 server LTS in VMwarePartitioned with installation guide, whole with LVMExtra empty virtual disk 8GB added as second SCSI device Steps: 1. Partition the new disk:

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

原创 Python MySQLdb unicode

无数人写过 blog / post 关于这个问题,但我还是又重新解决了一遍。先公布答案。 1、MySQLdb 连接类型conn = MySQLdb.connect(..., use_unicode = True, charset = "utf8",)  2、cursor.fetchall() 得到的字符串 typeof() 得到 ,所以要串接,要全部使用 unicodefo

2009-07-29 10:45:00 3973 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 at http://wwwolf.3322.org/tracs/alp 为进一步完善翻译、

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

原创 4000万的重量级闹剧

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

2009-06-16 00:44:00 1769

原创 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 /new without actually mounting my shiny-new-1T-waste

2009-03-03 00:57:00 1323 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 1175

原创 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 172.19.10.11 netmask 255.255.255

2009-02-26 14:45:00 1457

原创 Netcraft brain-dead

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

2009-02-26 12:35:00 1626

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

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

2008-11-29 18:39:00 1404

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

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