Minimalist Timer is out


It’s now on AppStore, and also reviewed by Beautiful Pixels.

Posted in iPhone, Software | 4 Comments

Timer under construction

I decided to write a timer app when I saw this nicely designed dial.

Preview:

Posted in iPhone, Software | Leave a comment

How to exclude a sub-directory when using zip -r in Linux

The trick is to double-quote the sub-directory to be excluded:

 zip -r blog_20111108 blog -x "blog/public/assets/*" 
Posted in Uncategorized | Leave a comment

Web sharing cannot be started after Lion upgrade

After upgraded to Lion, Web Sharing cannot be started. In my case, it’s caused by the missing fastcgi_module. To fix, open httpd.conf in /etc/apache2/ and comment it out:

LoadModule php5_module        libexec/apache2/libphp5.so
# LoadModule fastcgi_module     libexec/apache2/mod_fastcgi.so
Posted in Lion | Leave a comment

How to uninstall php-osx

To uninstall php-osx, in /etc/apache2/httpd.conf, change:

LoadModule php5_module /usr/local/php5/libphp5.so

to

LoadModule php5_module libexec/apache2/libphp5.so

optionally, remove:

/usr/local/php5-*

Source: https://github.com/liip/php-osx/issues/7#issuecomment-1653742

Posted in OS X | Leave a comment

How to downgrade rubygems

For whatever reason, here is how to downgrade gem from 1.5.0 to 1.4.2:

gem install rubygems-update -v 1.4.2
gem uninstall rubygems-update -v 1.5.0
update_rubygems

sudo if needed.

Posted in Rails | Leave a comment

How to build Fuego on iPhone

There are two challenges when building Fuego on iPhone:

  1. to build the boost library on iPhone
  2. to include appropriate files from the Fuego source and interface with the engine

I created an iPhone project. To build:

  1. please follow Semmel’s blog to build the boost library to an iPhone framework
  2. download the Fuego iPhone project from github
  3. add the boost.framework built in step 1 to the iPhone project downloaded in step 2
  4. compile

Fuego 1.0, iOS 4.2.

Enjoy~

Posted in Go, iPhone | Leave a comment

How to install mysql gem on OS X Snow Leopard

If there is an error when staring a Rails application via a MySQL connection:

Status: 500 Internal Server Error
uninitialized constant MysqlCompat::MysqlRes

Assume MySQL is already installed, for example, via homebrew:

 brew install mysql

or other means.

1. Un-install the existing mysql gem (if any):

 sudo gem uninstall mysql

2. Locate the ‘mysql_config’ file:

 find /usr -name 'mysql_config'

3. Re-install mysql gem:

 sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/bin/mysql_config

Note: replace ‘/usr/local/bin/’ with the corresponding mysql_config path found in step 2.

cheers~

Posted in MySQL, Rails | Leave a comment

如果 10.6.4 昇級 10.6.5 失敗 …

可以試試 Griff 的方法 [link]:

Posted in OS X | Leave a comment

如何學習 iPhone / iPad 編程

這是一個經常遇到的問題,我推薦三個方法:

1 書本

Beginning iPhone 3 Development: Exploring the iPhone SDK
iPhone Programming: The Big Nerd Ranch Guide

2 課程

Stanford University iPhone Application Development (Winter 2010)
CS 193P iPhone Application Development

3 文檔

Apple Creating an iPhone Application
iOS Application Programming Guide

當然,沒有什麼比實戰更重要,打開 Xcode,開始吧

Posted in iPad, iPhone | 1 Comment