蓝天,小湖,湖水中一方小筑

Tunning Rails with DTrace

This post will talk about how to do performance test of Rails program with DTrace tool. The testing will be separated into Ruby program part and database operations part. Please make sure all the tested program has provided probes to the DTrace.

NOTICE: The testing data is still under collection, this post has only DTrace script now, I will update this post after gathering enough testing data.

Ruby learning log

Just studied Ruby with the tutorial on website rubylearning.com in the past week, and here are some knowledge gained those days.

List all CVS tags

最近在折腾一个CVS的库,需要把它里面所有的tags给列出来,在网上找了一个Perl脚本,以前一直是直接用的,那天看了看发现原来不是很难,于是写了一个Python的,为的是可以当成函数嵌到我的脚本中。

Simple Life Game in HTML5

想着好久没写blog了,刚好在看计算中的上帝时,里面有提到生命游戏,所以就顺手写了一个,顺便凑篇文章。

Get Return Value from popen System Call

popen的调用的返回值是popen自己的返回值,并不是被调用程序的返回值,如果需要取被调用程序的返回值,则需要先用pclose()取到返回的status信 息,再用wait的宏进行判断。 int status = pclose(fp); if (status == -1) { printf("Error reported by pclose()\n"); exit(1); } else { printf("Process exited? %s\n", WIFEXITED(status) ? "yes" : "no"); printf("Process status: %d\n", WEXITSTATUS(status)); } 其实是满早前问的一个问题,忘更新过来了。

Use TaobaoAPI in SAE

需求是这样的,有一批宝贝需要导入到淘宝的店铺中,但是淘宝助手支持导入CSV文件格式过于诡异,所以只好转向API。

本来就是一个拼POST参数发请求的事情,淘宝非弄出来一个lotusphp的框架,本机调试倒是满方便的,但是传到新浪的SAE上后,那满屏的warning看着那叫一个壮观啊。又不想再去学用别的第三方SDK了,于是开始打这个框架的主意。