<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/platform.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar/4684235500622716427?origin\x3dhttps://blog.caiwangqin.com', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>

Caiwangqin's blog

Focus on Life, Cloud Service, Smart Hardware, Architecture, Technic and beyond…

hello wpToGo!

2008年11月13日星期四

another wordpress client for android.


标签:

posted by Caiwangqin, 06:29 | Permalink | 0 comments |

ChinaonRails free ruby/rails books contributed by bd7lx

2008年10月22日星期三





























chinaonrails_free_ruby_rails_books - Upload a Document to Scribd

上周bd7lx决定将自己撰写《Web开发大全-ROR版》的稿费换成RUBY/RAILS新书赠送,我今天已经收到了电子工业出版社送来的41本书,详细书单请查阅上面的文档。促成这件事的人有在武汉的博文视点,电子工业出版社,非常感谢这些为Ruby/Rails在中国做出无私奉献的人。


现在书已经在我这里了,准备在以后的Ruby/Rails中文社区里的各项活动中赠送给Topic分享者和有贡献的朋友们,如果有什么分书的建议,欢迎与我取得联系。





Technorati : , ,


标签:

posted by Caiwangqin, 07:26 | Permalink | 0 comments |

vim for ruby on rails

2008年10月16日星期四







vim for ror, originally uploaded by caiwangqin.


plugins:

rails.vim

fuzzyfinder.vim

fuzzyfinder_textmate.vim

minibufexpl.vim

NERD_tree.vim


colorscheme vibrantink

http://www.vim.org/scripts/script.php?script_id=1794


mkdir ~/.vim/plugin

touch ~/.vim/plugin/mcfg.vim

vim ~/.vim/plugin/mcfg.vim


content for mcfg.vim

http://docs.google.com/Doc?id=dd76mrkf_184g3rp7gg6


标签:

posted by Caiwangqin, 11:32 | Permalink | 0 comments |

收到博文视点给我寄的《Web开发大全-ROR版》

2008年9月19日星期五







WEB-ROR, originally uploaded by caiwangqin.


今年6月的时候书就已经完稿,今天我收到博文视点给我寄的书了。很高兴,就是书名看起来有点不专业,封面设计得也不专业,我还是比较喜欢Pragmatic的封面设计。看起来大方,成体系。不过本书的内容还是值得推荐的,因为确实是Rury on Rails实践者写的。


标签:

posted by Caiwangqin, 09:06 | Permalink | 0 comments |

[P1.cn] 欢迎 Hui Zheng 加入 P1.cn 团队

2008年9月1日星期一


Hui Zheng:


http://workingwithrails.com/person/6912-hui-zheng


http://the.colorsofmysea.com/




从今天起,P1.CN 开发团队增加了1名Ruby on Rails Developer。从我们推行 Scrum 项目管理方法到现在,已经过了4个 Sprint , Scrum 真是个很好的项目管理过程,它不但帮助团队提升了生产效率,而且在团队成员工作交替过程中发挥了很大作用。


标签:

posted by Caiwangqin, 09:18 | Permalink | 0 comments |

Facebook 开放平台源码

2008年7月18日星期五

Facebook开放平台源码了, 虽然不是全部, 但已经相当多了. 在这里可以下载 Facebook 平台.


这个周末开始学习研究.


BTW:


Is this open social or open platform? I don’t know.


Is NCP2.0 open platform? No, it isn’t.





Technorati :


标签:

posted by Caiwangqin, 07:03 | Permalink | 0 comments |

We do scrum

2008年7月14日星期一

posted by Caiwangqin, 06:04 | Permalink | 0 comments |

使用RubyonRails建设积木式网站架构与部署

2008年7月2日星期三


如图所示,在中间的 Application 层,在不同的时间段,我们使用了不同版本的 Rails 开发了不同的功能模块。虽然 best practices 是将 Rails 版本 update to date , 但实际工作中可能由于具体业务使用了特定的部件使 update to date 变得不太容易。当新的Rails版本出来后,开发新的一个功能时,我们也不希望继续在旧的Rails版本上开发,于是我们采用了如图所示的积木式网站架构。


附 Nginx 的部署方式如下,以下示例中 app1,app2 使用 Rails1.2.3, app3 使用 Rails2.1, 启动 app3 的 mongrel 需要使用 prefix 选项:


mongrel_rails mongrel::start --prefix /app3 -p 5001
mongrel_rails mongrel::start –prefix /app3 -p 5002


nginx.conf:


user www;
worker_processes 1;

events {
worker_connections 1024;
}

http {

include mime.types;

upstream mongrel_cluster1 {
server 127.0.0.1:3001;
server 127.0.0.1:3002;
}

upstream mongrel_cluster2 {
server 127.0.0.1:4001;
server 127.0.0.1:4002;
}


upstream mongrel_cluster3 {
server 127.0.0.1:5001;
server 127.0.0.1:5002;
}

server {
listen 127.0.0.1:80 default deferred;

location /app1/ {
proxy_pass http://mongrel_cluster1/;
}

location /app2/ {
proxy_pass http://mongrel_cluster2/;
}


location /app3/ {
proxy_pass http://mongrel_cluster3/app3/;
}
}
}


标签:

posted by Caiwangqin, 09:52 | Permalink | 0 comments |

Ruby on Rails 2.1更新了什么?

2008年6月20日星期五


这是的来自ChinaonRails.com社区对Ruby on Rails 2.1, What’s New?的中文翻译版本。点击这里下载.


译序:


Rails2.1发布已经有段时间了,我们都是零零碎碎的看到一些新功能介绍文章,且基本上都是英文的,中
文资料不多,仅有一些比较零碎的片段,看到 《Ruby On Raisl 2.1,what’s new》(Second Edition),大
致的翻了一遍,发现其介绍的比较全面和具体,邀请一些Railser一起翻译成中文版本,望此文档能带给大
家有用的信息,如果您发现 有不妥的地方,欢迎指出,同时也希望有时间、愿意贡献的朋友一起加入,后续会再翻译其他的书籍!


英文PDF:
http://www.nomedojogo.com/livro/carlosbrando-rubyonrails21_en.pdf
发起地址:
http://chinaonrails.com/topic/view/1713.html


标签:

posted by Caiwangqin, 02:04 | Permalink | 0 comments |

Hello Ruby on Rails 2.1

2008年6月12日星期四


we start to use Ruby on Rails 2.1 for new features of P1.cn, Eg. P1 Groups.


here is one book about what’s new in rails 2.1 in Portuguese, the English translation from the Brazilian community united, Click here to download.


标签:

posted by Caiwangqin, 10:23 | Permalink | 0 comments |

Talk.org, a better, lightly, google account integration Twitter.

2008年6月11日星期三

Talk.org


标签:

posted by Caiwangqin, 03:03 | Permalink | 0 comments |

《程序员》06期:2008开源在中国 - 敏捷与性能的博弈

2008年6月6日星期五


应程序员杂志技术编辑 zhaojp 的约稿,从敏捷和性能两方面,结合这一年时间以来 P1.cn 网站建设实践,和大家做了一下ROR开发经验分享。


文章发布在《程序员》2008年06期技术专栏,标题为《敏捷与性能的博弈–Ruby on Rails Web developement》。


标签:

posted by Caiwangqin, 11:09 | Permalink | 0 comments |

从 svn 到 git

2008年6月5日星期四

安装 git:


Linux:


sudo apt-get install git-svn


Windows:


http://code.google.com/p/msysgit/





创建Git Repository





1.在本地创建



mkdir new_repository


cd new_repository


git init-db



2.从已存在的Repository获取




git clone /path/to/exist/repository


3.在远程服务器上创建bare repository




$ ssh myserver.com
Welcome to myserver.com!
$ mkdir /var/git/myapp.git && cd /var/git/myapp.git
$ git –bare init
Initialized empty Git repository in /var/git/myapp.git
$ exit
Bye!



4.在本地添加远程repository并push




$ cd ~/Sites/myapp
$ git remote add origin ssh://myserver.com/var/git/myapp.git
$ git push origin master



5.使用ssh从远程服务器上获取文件



git clone ssh://user@myserver.com/var/git/myapp.git



添加文件






git add /path/to/filename # 添加单个文件





git add filename [filename] # 添加多个文件





git add /path/to/directory # 添加文件夹





git add ./ # 添加当前文件夹






提交文件





1.提交本地更新





git commit -m “commit message is here”





OR





git commit -a -m “commit message is here”






2.提交更新至远端



git push /path/to/repository






更新文件





1.更新本地工作目录文件





git checkout -f









2.更新远端文件



git pull /path/to/repository






创建分支





创建自己的工作分支,以避免对Master Branch 的影响



git branch raecoo # 成功创建了名为raecoo的分支



git checkout raecoo # 将当前工作切换至raecoo分支



删除分支




git-branch -D branch-name



合并分支



git checkout master # 切换当前分支到master





git merge “merge message is here” HEAD raecoo # 将raecoo分支与master分支合并





OR





git checkout master #效果与上相同





git pull . raecoo



参考:


http://www.robinlu.com/blog/archives/191


http://www.robinlu.com/blog/archives/194


http://toolmantim.com/article/2007/12/5/setting_up_a_new_remote_git_repository


标签:

posted by Caiwangqin, 06:31 | Permalink | 0 comments |

[P1.cn] 欢迎 Raecoo 加入 P1.cn 团队

2008年6月2日星期一


Raecoo:


http://www.quannei.com


http://www.8ending.com


http://actsasmessages.googlecode.com



从今天起,P1.CN 开发团队又增加了1名Ruby on Rails Developer。P1 Groups 即将推出,敬请期待更精彩的P1, 更稳定的服务。


标签:

posted by Caiwangqin, 05:48 | Permalink | 0 comments |

来自 HiPiHi 和 Novoking 的糟糕虚拟世界体验

2008年5月31日星期六

又看到Tangos写了一篇关于Virtual World的Blog,于是心血来潮试用了一下虚拟世界Hipihi和Novoking. 体验不是一般的差。


下载安装了HiPiHi_world_50021,进入后不能容忍粗劣的画面和慢动作。找了一圈只发现有17个人在线(周六下午),根本找不到人交流。于是退出并卸载了程序。


Novoking 0.94 beta 版的画面和行走体验都要HiPiHi好多了,登录后,穿着短库在里面跑了5分钟,终于找到了时装店,由于操作的不灵便,花了15分钟才晕晕的买到一身服装。里面也就没人可以交流。


而我之前体验过网络游戏,几乎任何一款网游都比Hipihi和Novoking做得要好,不管是人物的移动和画面的美观。


与其说 Hipihi 和 Novoking 是Web 2.0的社区,不如说是只有粗糙场景的3D游戏雏形。我本人非常看好这一类的社区产品,希望他们哪家能做好了,于是我到虚拟世界里去开个烤鸭店,或在Virtual World里卖麦当劳,然后送到现实人的手中,岂不是很好玩?


然而现在显然不行,还是要先做好产品。产品不好,再多的软文行销也是没用的。


标签:

posted by Caiwangqin, 07:54 | Permalink | 0 comments |

Looking for UI web-graphics Designer

2008年5月22日星期四

UI web-graphics Designer
P1.CN is looking for an experienced UI web-graphics designer to work in a key position of the product design. You are required to design pages from function specifications and prototypes. The position is full-time in our main office at the 28th floor of Chaowai SOHO Tower, Beijing.


Responsibilities


* Design webpages from function specification and/or prototypes/sketches
* Develop, implement and extend style guidelines
* Keep pages on pixel perfection
* Facilitate the user experience


Requirements


* 3+ years experience working in a related field
* Understand the product and its goals
* Understand the users thoughts & needs on a design level
* Sketch drawing
* Expertise in Photoshop
* Expertise in any webeditor available (such as Dreamweaver, Namo, etc.)
* Deep understanding of the social networking space
* Good understanding of written and spoken english
* Ability to handle the pressure and fluidity of a start-up environment
* Extremely detail oriented down to pixel-perfect implementation


Bonus points


* Active in the design community
* Experience with Illustrator, InDesign
* Knowledge of web-programming is welcome (RubyOnRails, PHP, etc.)
* Knowledge in XHTML, CSS


Contact


Email a@p1.cn
Skype: alexander.frederiksen


标签:

posted by Caiwangqin, 10:54 | Permalink | 0 comments |

Good by Jianwai SOHO, Hello Shaowai SOHO.

2008年5月16日星期五

Our company has been moved to Shaowai SOHO from Jianwai SOHO yesterday.



We have stayed in Jianwai SOHO for 16 months.



We are in Shaowai SOHO from now on.


New Office, New P1.cn !


标签:

posted by Caiwangqin, 08:59 | Permalink | 0 comments |

Try FiveRuns Manage 2.0

2008年5月14日星期三

Server stat:


Linux p1 2.6.24-1-amd64

Nginx 0.5.35

ruby 1.8.6 (2008-03-03 patchlevel 114)

rails 1.2.3

mongrel (1.1.4)


Try progress:



  1. Sign up an account for FiveRuns Manage

  2. Install fiveruns_manage client on Deban sarge

    $ wget http://manage.fiveruns.com/system/downloads/client/manage-installer-linux-ubuntu-64bit-intel.sh

    $ sudo sh manage-install-linux-distro-xbit-intel.sh



  3. click “I’ve Finished the Installation” in FiveRuns Manage dashboard, pick up which Subsystems & Applications should be monited.

  4. get report

  5. wow, the Interactive Metric Graphs is really cool!




标签:

posted by Caiwangqin, 07:25 | Permalink | 0 comments |

使用 hdparm 测试硬盘速度

2008年4月29日星期二

使用 hdparm 测试硬盘速度:



hdparm 是linux 测试硬盘及改变硬盘设定的指令


#hdparm -t /dev/hda < - - - 测试硬盘/dev/hda 的速度


如果是scsi 的话/dev/sda , /dev/sdb


#hdparm -c 1 /dev/hda < - - - 开启ide 硬盘的32bit


#hdparm -d 1 /dev/hda < - - - 开启dma mode


这样再次的测试你的硬盘就可以发现你的硬盘便快了



以下是我对三台安装 Debian 操作系统的计算机所做的测试结果:



1×250Gb STAT PC



# hdparm -t /dev/sda2


/dev/sda2:
Timing buffered disk reads: 264 MB in 3.01 seconds = 87.60 MB/sec



2×140Gb SCSI RAID1



# hdparm -t /dev/md0


/dev/md0:
Timing buffered disk reads: 226 MB in 3.02 seconds = 74.83 MB/sec

# hdparm -t /dev/md2


/dev/md2:
Timing buffered disk reads: 208 MB in 3.02 seconds = 68.97 MB/sec
















4×1Tb STAT ES.2 RAID5


# hdparm -t /dev/sda1


/dev/sda1:
Timing buffered disk reads: 226 MB in 3.01 seconds = 75.00 MB/sec
# hdparm -t /dev/sdb1


/dev/sdb1:
Timing buffered disk reads: 344 MB in 3.03 seconds = 113.71 MB/sec
# hdparm -t /dev/sdb2


/dev/sdb2:
Timing buffered disk reads: 318 MB in 3.02 seconds = 105.32 MB/sec






标签:

posted by Caiwangqin, 11:15 | Permalink | 0 comments |

Switch Rails cache files from file_store to ramfs_store

2008年4月25日星期五

we found the problem of my last post, like this post, Innodb Locks cause something else spend long time in transaction.


It is expire_action from disk in our case. we used action_cache plugin in rails application, we have multiple languange versions of zh and en, so we write expire_reg_action to expire both cache when content after_save, this will spent long time when delete cache from huge files.


so we switch Rails cache files from file_store to ramfs_store temporary, it works perfect right now.


mount -t ramfs ramfs /home/yay/rails_app/current/tmp/cache




reference :



  1. rails缓存机制的几个问题

  2. Innodb Locks, ActiveRecord and acts_as_ferret Problem





标签:

posted by Caiwangqin, 07:30 | Permalink | 0 comments |