赞比亚比较搞

August 8, 2008

好不容易不用字母排序吧,偏偏赞字笔画数真不少。

不过排后头也有好处,因为跟中国挨一起,大家这会都打起精神来看入场了。

奥运倡导和平。据说俄罗斯跟格鲁吉亚干起来了。

性价比不错的无线键盘

July 31, 2008

新近组的 HTPC,低耗(AMD BE-2400)、板载128M显存(GA-MA78GPM-DS2H)+内存共享通过 HDMI 点对点输出到电视,播放 1080P 非常轻松。唯一的问题就是下片实在太麻烦,附近又没有可以拷片的地方。

Htpc

买了个雷柏8100 2.4G 无线键鼠套装,两百块钱不到,使用起来感觉还不错。键盘左右两侧的快捷键(特别是右侧的多媒体键)非常方便。坐在沙发上看电影很舒服呢。不过看电视上的字实在太小了,把 DPI 调至 192 了,才稍微好些,可惜很多应用程序在这个 DPI 下会变得面目全非。

Rapoo

家里电视信号很差,更糟糕的是现在电视上不是广告就是奥运。还是从电驴上拖电影看比较惬意。

有了这个 HTPC 做伴,看股票上银行也方便,MBP上的XP虚拟机可以少开了。

There’s something in the air

July 24, 2008

天太热,路由器和猫也很热。突发其想,为什么不把它们挪到空调上方去呢。

说干就干,一番上窜下跳,这些“先进的网络通讯设备”便到了 air 中和 conditioner 上方去了。哈哈,这下地面上比较干净了,我也不会不小心踢着这些东西了。

去二楼我爸房里试了下,信号似乎没有明显的变化。基本上大部分的损失是由楼板中的钢筋造成的,我想。

实际效果图:

Router

唉,电器的拖线总是很恶心,什么时间电子设备都无线化呢(主要是那些电源线)。

空调上方似乎比较凉快。有懂行的兄弟记得告诉我一下,这样搭配对空调会不会有影响。哈哈。

iPhone 2.0 中文输入

July 20, 2008 Tags:

升级到 iphone 2.0后,1.1.4 下使用 installer 装的软件都没了。要打电话、发短信,中文输入必不可少。好在 iphone 2.0 内置了中文输入法,没有必要再安装 WeFit 了。

要打开中文输入法,进入 Settings - General - International - Keyboards - Chinese (Simplified)

Iphone 2 Chinese Input

将 Handwriting 和 Pinyin 均设为 ON。

Iphone 2 Chinese Input on

这样,就可以使用拼音或手写进行中文输入了。手写识别率非常不错,赞一个。

BTW,iphone 2.0 下也没必要安装截屏软件了。按住 Home 键,再按 Sleep 键,屏幕一闪,就自动截屏并保存至相册里了。

使用 PwnageTool 破解 iPhone 2.0

July 20, 2008 Tags: , , , ,

iPhone Dev Team 终于发布了 PwnageTool 2.0。可以从这个镜像下载,注意 PwnageTool 2.0 是一个 Mac 程序。Update:已经升级至2.0.1版本。

安装完后,没有 google 教程就迫不及待地进行“破解”操作。结果卡在了最后一步,错误提示是:Failed to Ener DFU mode。真是要命。

重试了几次,未果。查到这篇文章,提到使用 PwnageTool 2.0 之前要先做的一些操作。查看了一下 ~/Library/iTunes/,果然没有 Device Support 目录,便创建了一个。

再重试一次,这次可以进入 DFU 了。

Iphone Pwnage dfu

接下来,退出 PwnageTool,进入 iTunes 把刚生成的 2.0 固件 restore(option + Restore) 进去就搞定了。再还原备份,同步其他资料。iPhone 又活过来了。

注:

  • 需要使用 iTunes 7.7 下载 2.0 版本的固件。我的 iPhone 原来是 1.1.4 版本(一代),相应的固件文件名为 iPhone1,1_2.0_5A347_Restore.ipsw。
  • PwnageTool 在 Device Support 下放入了一个 x12220000_4_Recovery.ipsw 文件。它能不能再 nice 一点,找不着这个目录的时候自动创建一个,而不是莫名其妙地给出一个无法进入 DFU mode 的错误?Update: PwnageTool 2.0.1已经这么做了,详见其官方博客
  • Lifehacker上的详细破解教程

俯卧撑

July 18, 2008 Tags:

别被标题恍了。这里说的是真正的俯卧撑。

在很久很久以前,我每天一次性做60个俯卧撑,一直从小学坚持到大学(哦,中间其实是断断续续的)。那时候的我可没现在这么胖,体力比现在棒好多,肱二头肌摸起来硬梆梆的。

后来我懒了,吃的多了,动的少了。于是成了现在这幅熊样。

俯卧撑是很不错的健身方法。今天我宣布重新开始用这种简单的方式锻炼身体。好的教程能让做任何事情都事半功倍。我的教程是one hundred push ups

one hundred push ups

在此立据:initial test 27 个(下巴碰到地板的高标准:)。

Upgraded to WordPress 2.6

July 18, 2008 Tags: ,

Upgrading with svn was so smooth and fast. Cool.

Tags on Git

June 30, 2008 Tags: , ,

Tags of SVN are just copies of trunk. Tags of Git, on the other hand, are much more powerful. Here I’ll show you how to add/delete git tags locally and remotely.

I’ll take google_map_example for example. The google_map_example is an open project on github that shows sample codes from the book Beginning Google Maps Applications with Rails and Ajax: From Novice to Professional. The codes will be changed slightly to use Rails 2.1.

Say I’ve keyed in the codes from chapter 1, now I’d like to tag the last commit. This is can be done in this way:

phantom:~/codex/maps (master) james$ git tag -a -m "tagged chap_1" chap_1
phantom:~/codex/maps (master) james$ git tag -l
chap_1

A local tag named “chap_1″ has been created. Keep in mind it’s merely a LOCAL tag, which means you have to push it to the remote repository to let other guys see it.

Here’s the tricky thing, git push won’t push the tag to the remote, git push –all won’t neither! Use this instead:

phantom:~/codex/maps (master) james$ git push --tags
updating 'refs/tags/chap_1'
  from 0000000000000000000000000000000000000000
  to   63db0052a27914db5f1a9fe6e1321309e8111f82
Generating pack...
Done counting 1 objects.
Deltifying 1 objects...
 100% (1/1) done
Writing 1 objects...
 100% (1/1) done
Total 1 (delta 0), reused 0 (delta 0)

Let’s go to the github project page to check if the tag has been pushed. Visit http://github.com/ashchan/google_maps_example/tree/master, hover mouse to “all tags”. Cheers, it’s there!

Git tag

Later I decide to remove this tag. Piece of cake, just use the git tag -d command:

phantom:~/codex/maps (master) james$ git tag -d chap_1
Deleted tag 'chap_1'
phantom:~/codex/maps (master) james$ git tag -l

Note when I use git tag -l it shows no local tags.

It’s a little bit complicated to use the push command to remove the remote tag:

phantom:~/codex/maps (master) james$ git push origin :refs/tags/chap_1
deleting 'refs/tags/chap_1'
Everything up-to-date

I googled a lot and couldn’t find any documents showing this example. Almost all people know that git push remotename :refs/heads/branchname would delete a remote branch, so it’s not very hard for me to figure out how to delete a remote tag :p

I’m new to git but I’ve been planning to migrate most projects to git. Hope this helps.