SSH login without password (ref: http://t.cn/zOJ0itN)


1) ssh-keygen -t rsa (don’t set passphrase to avoid input passphrase everytime; also you can use keychain tool to automatically input passphrase)

2) create a file /usr/bin/myssh with mode 755 and content “cat ~/.ssh/id_rsa.pub | ssh $1 ‘mkdir -p ~/.ssh ; chmod 700 ~/.ssh; cat >> ~/.ssh/authorized_keys; chmod 640 ~/.ssh/authorized_keys’ ; ssh $1 “

3) myssh user@remotehost


# get the sources for the first time
git clone git_repo_url

# check out branch
git checkout master ( or your own branch)

# write code
git commit -a -m “try best to make your comments meaningful”

# pull latest changes to avoid massup due to auto merge
git pull –rebase

# Post code review to the reviewboard
post-review –guess-summary –guess-description
post-review –guess-summary –guess-description –revision-range HEAD~3:HEAD

# If code change needed per review comments

## if only commit message change needed
git commit –amend

## if both code and commit message change needed
git reset –soft HEAD~1
modify code
git add /path/to/new_modified_files
git commit -c ORIG_HEAD

# Post another review based on the previous one
post-review -r the_previous_review_num

# Ready to push
git pull –rebase (merge with changes made by others)
git push

As a code committer for Open Source Project Chef, I attended the 2nd Opscode Community Summit 2012 on October 23 & 24 in Seattle, WA.  Here is my notes for this summit.


  • about 100 persons attended this summit
  • a few SMB company and startups attended this summit, learning Chef and sharing achievements/techniques/questions with the community, including Opscode, CloudScaling, DreamHost, Blue Box, HP, Google,  Adobe, ThoughtWorks, Workday, LivingSocial, Qualcomm, Mopub, Nordstrom, OneHealth, Wikia, Fidelity, Heavy Water, thePlatform, etc.


  • about 46 one-hour sessions are hold (see session ; about 10~15 attendees for each session; Opscode holds about 1/3 sessions while Dreamhost, CloudScaling and others hold other sessions.
  • I hold one session ‘How VMware Serengeti uses Chef to Provision a Hadoop Cluster in a vSphere Cloud’, for introducing Serengeti, Ironfan and Chef techniques used in Serengeti.  Luckily about 6 persons are interested in my session.  They’re interested in:
    • architecture of Serengeti Ironfan?
    • what’s special in Hadoop and vSphere?
    • can Hadoop ran well in vSphere as in physical hosts?
    • any benchmarking?
  • Some hot topics
    • Chef Orchestration Layer (such as Ironfan)
    • Bare Metal Provisioning Tool (such as Razor from EMC + PuppetLabs, FAI)
    • Windows support of Chef
    • Chef Driven Monitoring and Metrics (e.g. Nagios)
    • TDD for writing Chef Cookbooks
    • Cookbook versioning
    • Chef Knife plugins for OpenStack and EC2
    • etc.


Serengeti and HVE

  • A Opscode Sales Manager is very interested in Serengeti and HVE, and told me that almost all their customers who runs hadoop are running it on physical machines rather than virtual machines.
  • She cares about the performance comparison of Hadoop+HVE on vSphere and Hadoop on physical hosts.
  • A CTO of a startup in Silicon Valley shows strong interests of Serengeti/Hadoop and Ironfan.


  • Ironfan/Infochimps has good reputation in Chef world (although there are a few people are not familiar with it)
  • Ironfan does a good job as Chef Orchestration tool. In the session ‘Chef Orchestration Layer’, users are eager to find an powerful Chef Orchestration layer, and find a solution to manager Chef nodes, control the bootstrapping workflow, handle cluster service dependency to resolve racing condition.   I introduced the appoach used in Serengeti and are well received.
  • seems there is no other orchestration tools (I only heard 2 tool in this summit) better than Ironfan in Chef world.


  • EMC and PuppetLab’s Project Razor (released in May 2012) can do physical and virtual hardware provisioning and software provisioning. Razor is open sourced under the Apache 2.0 and is fully compatible with both Puppet open source and Puppet Enterprise.
  • Some SMB and startups are using Physical Hosts + Chef to provision their infrastructure (such as Wikia)

Data Director

  • Fidelity uses a software for provisioning mysql and postgresql db (but not Oracle), sounds like very similar to Data Director. Maybe Fidelity company can become a potential customer of DD.


  • Talked with Chef creator and Opscode co-founder Adam Jacob about adding a  rollback feature (CHEF-3502) into Chef.
  • Talked with the organizer of Opscode Community Summit 2012 (also the Opscode co-founder) Jessie Robbins about Serengeti.
  • Talked with Joshua Timberman (Opscode Technical Community Manager) about adding a new feature (CHEF-3571) into Chef, and we are collaborating on driving the feature into next version of Chef.
  • etc.

Thanks very much!

Solution: compact couchdb file (/var/lib/couchdb/chef.couch) used by Chef Server

$ curl -H “Content-Type: application/json” -X POST http://localhost:5984/chef/_compact

ref: http://wiki.opscode.com/display/chef/CouchDB+Administration+for+Chef+Server

分享一个自动跳转到下一页的user.js – 搜狗浏览器论坛 http://t.cn/zWYkNaD 此插件适用于搜狗浏览器3.2版或以Webkit为核心的浏览器。 Firefox用户可以使用 AutoPager http://t.cn/zWYklmV 或 Nextpage http://t.cn/aKv4HC


1.  把nextpage-user-js.zip文件解压到  %appdata%/Sogouexplorer/Webkit/UserScripts/ (没有这个目录就创建一个)   只适用于3.0~3.2版本 (3.3和4.0好像都不支持UserScripts了,所以不能用)
2.   使用搜狗浏览器打开某个页面, 比如 http://www.newsmth.net/nForum/#!board/Joke
3.  切换到高速模式(这个user.js只在高速模式即Webkit内核下才有效)
4.  按下N或者右箭头,会跳转到下一页
5.  按下左箭头,会跳转到上一页
6.  按空格键,会翻页,在页面最底部按空格键  会跳转到下一页.

源代码来自 http://userscripts.org/scripts/show/87895 .  我加上了更多的快捷键(C 关闭页面, N 下一页)。

虚拟机(比如VMWare)的系统时钟会比正常时钟跑得快, 需要同步成标准时间, 否则有些要检查timeout的函数不能正常工作, 比如检查cookie, session是否失效.



1.  sudo vi /etc/crontab

2.  添加下面加粗的行, 成为一个每分钟执行的cron job.

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
*  * * * * root hwclock –hctosys 2>/dev/null >/dev/null

3.  重启crontab :  sudo service crond restart

Lotus Notes:

  1. Allow Import/Export mail rules. When reinstalling Notes, the mail rules get lost. (updated on 2010-10-22)
  2. Use “Space” key to scroll a mail body in preview panel and jump to next mail when already at the end of a mail body.
  3. Use mouse wheel to scrol a mail body when the mouse focus is not on the mail preview panel.
  4. Add a “Save then Open … “ option in context menu of an attachment in a received mail.
  5. When hovering on the email sender name, Notes now will display a floating panel. Should by default display all the information of this person rather than letting user to click the “Click to display more information” link.
  6. Add a “Copy Link Location” in the context menu of a http link in the email content.

Lotus Sametime:

  1. Automactically add/synchronize a contact group named “Peers” or something else to add all employees with the same manager as me for better collaboration.
  2. Add an option for only show contacts in “I’m available’” or “I’m in a meeting” status
  3. Add an menu item “Copy Email Address” in context popup menu when right clicking on a  Sametime contact.

Lotus Connection:

  1. Show changes of my friend’s profile in “Status Updates in My Network” when my friend has moved to a new office or changed job title, etc. (updated on 2010-11-05)
  2. Lotus Connection should provide the AtomPub or XmlRPC API for wikis just like for blogs. This allows quickly editing for wiki pages using thick client like Windows Live Write.  (updated on 2010-11-17)


These features/enhancement may be implemented as plugins first.

To add more and welcome your comments…