My Setup

This is a fake interview article in the format of The Setup. It’s enjoyable to figure out the most important stuff I use everyday in the process of this writing.

Who are you and what do you do?

I’m a code monkey working at Slide. At work, I build awesome social games using Python, Javascript, and Flash AS3. At home, I build iPhone apps with Objective C, and hobby apps on Google App Engine.

What hardware are you using?

At work I use a 15″ MacBook Pro (2nd gen unibody). I connect my Mac to one external Dell 2209WA monitor rotated at 90˚ at all time, with my terminal screen taking it at full screen. I use the Griffin Elevator to hold my MacBook Pro, with the Apple Bluetooth Keyboard and the Magic Mouse taking control. I have another 15″ MacBook Pro (1st gen unibody) for home use and a desktop computer running Ubuntu/Windows XP. On the desktop, I use Windows for gaming only and Ubuntu for everything else. But I’m spending very little time on the desktop for a while.

I use an iPhone 3GS for mobile computing. And I have the iPad on my wishlist.

And what software?

For programming I use vim. It’s super neat you can have the same developing environment as long as you work on a *nix system. My essential vim plugins are FuzzyFinder, TagList and NerdTree. My latest favorites are SnipMate and Neocomplcache. In a GUI environment I use the desert theme.

I used to use TextMate as my main editor but have converted since a while ago. TextMate is still top notch and I really like it. But there’s no denying it’s about to become the Duke Nukem in the text editor world.

I’m a heavy user of git, professionally as well as personally. It’s an awesome piece of software in itself and keep amazing me from time to time. I use GitHub for my personal stuff. It’s so great that I recently began to buy its paid service.

I’m a paying user of DropBox. I keep all my important data on DropBox and sync it over both my work and home computers running different systems, as well as my iPhone. It’s another piece of amazing software that I recommend to every friend.

I can’t part myself with QuickSilver. I do everything, I start it with QuickSilver. I find the web search plugin especially useful and I define a number of custom search command in the form of safari bookmarks. I use the SilverFlow plugin for QuickSilver. But a couple weeks ago I upgraded to Snow Leopard and it was a pain to get QuickSilver to work in the new system. So I’m trying to use Google Quick Search Box as an alternative for now. So far it’s almost as good except for customization and performance. Hopefully I can find a way to get QuickSilver work exactly the same way as in Leopard, or QSB gets really good soon.

I use Visor for a slick, Quake-like slide-in terminal. I use Megazoomer to zoom anything in full screen. I use Things both on Mac and iPhone to track all my tasks. It’s the best task management tool I’ve used. And I use Evernote to sync all my notes between Mac and iPhone. I have Thunderbird for Emails with the Nostalgy add-on for a mouse-less experience. I use PathFinder as an alternative to Finder. It’s just so much more powerful than the simplistic Finder.

My main browser is Webkit nightly. I use Firefox mostly for development using Firebug because it’s become a real beast for a browser. I also use Chrome for browsing. The Web Inspector tool shipped with Chrome dev is just not as good as that with Webkit nightly. But I love the Vimium plugin for Chrome.

What would be your dream setup?

I wish to have a 30″ monitor for development one day. The sheer screen real estate can simply change the way of working. I wish to have enough RAM to run everything I need at the same time without struggling with swapping. Infinitely fast processing power and network. And I wish *everything* could be wireless so I can get rid of any desktop clutter in my sight.

twtplus updated for Ubiquity 0.5+

I’ve updated the “twtplus” command for Ubiquity 0.5+. Since Github Gist sucks right now, (it’s very slow and cuts off the last lines of the code randomly without any prompt) I’m publishing the script here on my blog. Note that this is only compatible with Ubiq 0.5+ now.

Running Greasemonkey scripts on Ubiquity

Mozilla Ubiquity is not only a wonderful command engine and launcher. It can also be used to do stuff what Greasemonkey is good at, manipulating page DOM dynamically, by utilizing the “pageLoad_” function hook. To demonstrate this case I’ve quickly migrated the recently popular Twitter search on Google monkey script onto Ubiquity. You can get the Ubiq version of Twitter+Google search from here.

I retained the original DOM building code, but replaced the Ajax call with a JQuery one along with a couple hacks explained below to get it working from Ubiquity.

First, while Greasemonkey has built-in mechanism for filtering page URLs for selective script invocation, you have to do that on your own with Ubiquity. Look at the first few lines in the Ubiq command for the regex job to filter out Google search addresses.

    var href = doc.location.href;
    var q = (/^https?:\/\/(?:www\.)?google\..*\/.*[&?]q=([^&]*)(?:&|$)/(href)||0)[1];

Secondly, before publishing the script, you have to put such a line of comment in the script in order for Ubiquity to consider it an installable command and trigger the install bar at the top of the page. (Kudos to satyr for pointing out this hack)

//function cmd_

In similar ways, most of the Greasemonkey scripts can be migrated to Ubiquity.

twtplus – The missing Twitter command for Ubiquity and Firefox

Earlier this year I spent some time to write the “twtplus” command for Ubiquity, the intriguing Quicksilver-like plugin for Firefox. I’ve been tweaking it intermittently and now I’m gonna put together a little handy reference for it. Twtplus has the following features:

  • Post message to your twitter account (of course)
  • Preview your friends timeline. Click avatar to reply.
  • @ and d message to friends with friends username autocompletion. Notice that “@” is a modifier keyword so you need to leave a space after it to get the friend name autocompletion working.
  • Use “#url” tag to substitute the URL of the currently viewing page
  • Automatically shorten all URLs found in a message using http://is.gd
  • “as” modifier for posting as multiple twitter accounts.

Most of the features are pretty straightforward. Take a look at the following screenshot. Notice the grey hints after the “twtplus” command when you type and you’ll be fine.



In order to get multi-account posting working, there are a couple things I’d like to mention. First, due to the way the browser works, if you have a logged in session for Twitter, the browser will ALWAYS post your tweet as the currently logged in user, regardless of the one you specifies with the “as” modifier keyword. Thus the solution is to avoid being logged in via the Twitter web interface, or when the stock “twitter” command prompts you a login dailog. If you visit twitter.com and find that you’ve already logged in, log out explicitly.

Secondly, twtplus looks for your stored usernames and passwords for Twitter in your Firefox password manager, for the login authentication to Twitter and provide multiple account autocompletion suggestions. So you need to store your Twitter accounts with Firefox if you haven’t already. This is also a more secure and convenient way than the stock “twitter” command since you don’t need to input your twitter login from time to time.

Now get twtplus from here.

Update: Here’s an awesome screencast from @neo4zion


Ubiquity jiwai命令现在变得更强了。首先,现在提供了强大的电影,音乐,书籍标签功能,可以通过指定名称关键字来自动在消息里扩展出媒体信息,通过和叽歪富媒体功能的结合,可以非常方便的在叽歪个人主页上显示丰富的媒体信息。另外,经过调试多帐号发消息功能基本可以正常使用了。





  1. 在firefox上唤出Ubiquity窗口
  2. 输入”jiwai 刚看了1080p的#movie/变形金刚/ 太爽了!”,看到的就是这个样子:
  3. 其实没有第三步了,如果想要指定发消息的帐号的话,再输入”as 用户名”,回车发送就搞定了!









  • 自动用http://is.gd缩短消息里的所有URL(除了自动替换的媒体链接以外)
  • 使用#url标签来指定替代当前页面的地址(注意#url标签前后需要有空格)
  • @, d关键字自动完成好友用户名


推荐使用Ubiquity的Ubiquity Evolved皮肤,有足够的空间显示更多内容。在Simpliquity皮肤下显示媒体预览时候有时候会有问题。


目前版本本来打算支持多帐号,会检测已经在firefox保存了帐号的叽歪帐号,在发送消息的时候会通过“as”关键字指定的帐号来提供http basic auth的信息。但是看来叽歪api在第一次basic auth登录以后就不认http请求里的basic auth信息了,所以”as”关键字现在没作用,用来发送消息的帐号只能是第一次登录的帐号。为了避免混淆建议使用前先从web页面登录叽歪并选择记住登录帐号。
下一版本打算针对叽歪支持多种媒体嵌入的功能,提供自动从豆瓣搜索电影,书籍和音乐并嵌入豆瓣链接的功能。这样可以直接在消息里谈论一部电影的时候自动添加电影的豆瓣链接发送到叽歪,从而在叽歪页面上得到自动嵌入的电影海报和名字等信息。对书籍和音乐也同样如此。计划通过#movie{}, #book{}, #music{}这样的标签把需要嵌入的电影、书籍、音乐名字包起来这样使用。在开发的时候发现在Ubiquity预览豆瓣信息的时候,Ubiq界面有时候会莫名缩回去,不知道是不是Ubiq的bug。你要是有什么建议请告诉我。

Ubiquity Jiwai



code_swarm Python

今天又看到了code_swarm的Python视频,不禁贴出来共赏。外加code_swarm Eclipse作为Bonus。

code_swarm – Python from Michael Ogawa on Vimeo.

code_swarm – Eclipse (short ver.) from Michael Ogawa on Vimeo.


Feedlr是我用Grails做的一个pet project(宠物项目?)现在已经公开上线咯~

Feedlr是一个类似twitterfeed的miniblog mashup。但它除了twitter同时还支持国内的叽歪饭否,并且能让用户浏览所有在feedlr上创建的bot,就像个bot超市,找自己感兴趣的就能直接follow/关注了。



另外,你也可以把任何你感兴趣别人也可能感兴趣的feed用feedlr建立bot,让大家都能随时随地收到新鲜消息,比如我建立的cnBeta botGoogle新闻 bot,就有很多叽歪的朋友关注着咯。


Notes 8在Ubuntu Gutsy下启动崩溃问题和解决

Notes 8在Gutsy下已经运行的不错了,除了用scim不能输入中文。但是今天在一次意外退出以后,Notes每次启动都会提示出错,错误号CLFRJ00010E(毫无意义的出错信息并不是m$专利)。Google以后终于找到这篇文章,经过尝试以后我的解决方法是这样的。

sudo rm ~/lotus/notes/data/~notes.lck
ps -ef | grep lotus

user 22514 1 0 10:19 ? 00:00:01 /opt/ibm/lotus/notes/taskldr /opt/ibm/lotus/notes/taskldr

pkill -9 taskldr


P.S. 2008第一贴,祝各位新年快乐!

Tags: ,

Browse Happy logo

My tweets

« 八    



Fancy Stats