自定义博客皮肤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)
  • 资源 (2)
  • 论坛 (392)
  • 收藏
  • 关注

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

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

原创 One Year at Vimbra

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

2014-05-13 23:02:38 2600

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

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

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

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

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

原创 [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 2800

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

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

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

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

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

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

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

2013-01-06 16:21:30 3523 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 3448

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

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

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

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

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

原创 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 5672 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 948

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

原创 Mac Security Essentials, protecting yourself against Flashback virus

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

2012-04-11 16:15:42 713

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

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

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

原创 Virtualbox network setup with no public IP

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

2011-03-05 09:22:00 1950

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

原创 最强烈鄙视科迈!

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

2009-10-18 22:20:00 2599 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 1392 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 3783 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 3001 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 1624

原创 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 1212 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 1066

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

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

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

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

2008-11-29 18:39:00 1256

质数计算器

质数计算器:判断一个数字是否为质数。C#编写,使用新进程进行计算,可在计算中直接退出;带有错误捕捉。我的第一个C#程序

2006-03-16

质数查询器

在指定范围内查询所有质数。异常处理部分有待完善

2006-03-16

band_of_brothers, DelphiGuy

发表于 2008-01-21 最后回复 2019-10-14

韩寒:韩峰是个好干部

发表于 2010-03-04 最后回复 2019-10-12

cheers for the upcoming death of C++ and the good old 80's ..

发表于 2008-12-18 最后回复 2019-10-12

最近心情不好运势背,散分驱邪!兄弟姐妹进!

发表于 2004-11-08 最后回复 2019-10-12

[点名] 老邓,fetag,猪头流氓

发表于 2010-01-27 最后回复 2019-10-12

看看这样能不能召唤成功。

发表于 2009-03-06 最后回复 2019-10-12

上海大雨

发表于 2008-06-27 最后回复 2019-10-12

C/C++ 其它技术问题版诚征管理员一名

发表于 2007-06-04 最后回复 2019-10-12

召唤 Sammy 、 R9

发表于 2009-03-16 最后回复 2019-10-12

大陆人,你为什么不惭愧

发表于 2007-12-10 最后回复 2019-10-12

服务程序监测框架的设计

发表于 2012-02-17 最后回复 2019-02-05

辞职兼散分,感谢朋友们

发表于 2005-11-19 最后回复 2014-05-20

救命!IE6的问题

发表于 2002-10-30 最后回复 2012-11-23

发疯了!我要发疯了!

发表于 2002-11-06 最后回复 2012-11-23

Linux VS Windows:只有傻瓜才会纠缠不清的对比,

发表于 2002-11-19 最后回复 2012-11-23

成功激活 XP,放分庆祝;另有小小问题请教

发表于 2003-02-26 最后回复 2012-11-23

怎么在PC上安装Mac OS X?

发表于 2002-07-26 最后回复 2012-11-23

Win2kPro 是否支持安装在硬盘第二个主分区上?

发表于 2005-05-24 最后回复 2012-11-23

XP文件夹列表显示步正常的问题

发表于 2003-07-10 最后回复 2012-11-23

一个人因为不知道答案而提问,然后给一个自己看着最像的答案加分,这个规则有趣。

发表于 2012-02-20 最后回复 2012-02-21

CSDN 云邮箱。。咳咳

发表于 2012-02-15 最后回复 2012-02-15

我的 300 分那。。。

发表于 2010-04-16 最后回复 2012-02-12

那啥,CSDN 万岁。

发表于 2010-04-14 最后回复 2012-02-12

悲情家庭:长子注射疫苗得乙脑幼子喝奶粉患结石 - CSDN,删贴的,承担贴中人双倍的痛苦

发表于 2010-04-14 最后回复 2012-02-12

可耻的人。。

发表于 2010-04-09 最后回复 2012-02-12

伟大的土地财政,伟大的祖国

发表于 2010-04-06 最后回复 2012-02-12

围观支付宝与国字号超级在线银行和电子支付牌照的“无悬念挣扎” - 伟大的天朝不存在国进民退,马云代表全体Shitizen情绪稳定

发表于 2010-04-03 最后回复 2012-02-12

欢迎进入大中华网络时代 - DNS污染问题发生后中国关闭根服务器

发表于 2010-04-01 最后回复 2012-02-12

百度,感动常在。

发表于 2010-03-31 最后回复 2012-02-12

高清、无码、大图

发表于 2010-03-23 最后回复 2012-02-12

今日关注:县办公室的28个秘书

发表于 2010-02-26 最后回复 2012-02-12

喉舌:外媒的指责别有用心 另一篇

发表于 2010-02-25 最后回复 2012-02-12

阴险的美帝:Obama Urges CEOs to Rally Behind Business Agenda

发表于 2010-02-25 最后回复 2012-02-12

赵牧 :关于“这鸡蛋真难吃”的三十五种激烈争议

发表于 2010-02-23 最后回复 2012-02-12

伟大的喉舌:围绕发展第一要务履行职能

发表于 2010-02-23 最后回复 2012-02-12

韩寒:春天的故事

发表于 2010-02-15 最后回复 2012-02-12

鲁迅:药

发表于 2010-03-23 最后回复 2012-02-12

嗯?难道我的帐号被默默地解封了么?@steedhorse

发表于 2012-01-31 最后回复 2012-02-07

向 Loaden 老邓 / jinhao 鸡丁 提问!!!谈谈对这个问题的看法

发表于 2010-03-17 最后回复 2011-11-13

所有C/C++治下大小版主签名报到——招聘各分版块管理员

发表于 2009-06-26 最后回复 2011-06-02

空空如也

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

TA关注的人 TA的粉丝

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