蘋果 Macbook Air 開倉日誌
Water
|
05/03/2014
|

上星期,Apple 突然升級了 Macbook Air 全線系列到 Haswell chipset,還減了價。對於已有 Macbook Pro 的我其實沒有什麼想買的衝動。

Apple's New Macbook Air

不過,4月30日晚上網上突然傳來 Apple 標錯價問題,所以 Macbook Air 價格雖然沒有錯,但所有升級 Options (upgrade CPU, RAM, SSD) 也沒有標價,即選了升級價錢還是沒有變,另外三條thunderbolt adaptor (LAN, firewire, VGA) 也是沒有價錢可以免費包括。

Apple網站現漏洞,Macbook Air 升級規格竟不用加錢?

本著冇執輸心態於是也買了一部13"MBA頂級打爆,價值 HK$8988。

付款後價錢仍然不變。

Order completed

到 account check order status 仍然正常。

Order status 1

但當

Continue Reading

Checking iOS version
Water
|
04/15/2014
|

1. Compile-time checking OS version

_IPHONEOSVERSIONMAX_ALLOWED

This will check the maximum allowed OS version, that's the Base SDK version that the project is using. So we can include some code that feature is only available in newer SDK. But if we always assume coders are using newest version of SDK, this directive is rarely used.

#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_6_0
-(BOOL)s

Continue Reading

DIY Go Pole
Water
|
04/13/2014
|

原本想為 GoPro 買一枝 pole,因為發現跑步時用 pole 其實是最實用的。 市面上流行的有以下幾隻知名牌子:

  1. Go Pole
  2. XShot
  3. SP Gadgets

看一看價錢,嘩要成三百定五百多,一舊膠值幾多錢?你夠膽收就得嘞…

於是去淘寶買個 cheap 野:

Camera Pole 這種原本是給 compact camera 用,要加一 個 相機->GoPro adaptor。試用後完全唔得,因為這些 pole 大多是給 靜止時用的,於是:

  1. 關節位可以旋轉,GoPro 最後會由向上變了向下;
  2. Adaptor 位動多了也是很容易鬆了;
  3. 那個 ball joint 也很容易鬆。

於是決心自己做一個,要求是:

  1. 不需要太長,最好方便跑步;
  2. 最好可以伸縮;
  3. 關節位要少,最好用 GoPro 的螺絲可以控制鬆緊;
  4. 不能太脆弱,一定要可以用來跑步,最好可以滑雪;
  5. 價錢要平,製作要簡單;

於是這個地拖

Continue Reading

Adding webtrends framework crash the app
Water
|
04/11/2014
|

Try to add webtrends frameworks to one of my app. The framework request user to modify the app so that applicationDelegate should subclass webtrends' delegate. After the code is changed, the app crash right before the app launch:

    fwXXXXX[10818:60b] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<fwXXXXXAppDelegate 0xc574d90> setValue:forUndefinedKey:]:

Continue Reading

Developing Amazon S3 locally using fakes3
Water
|
04/10/2014
|

We can use fake S3 to simulate Amazon S3 service locally.

Installation

Use gem to install fakes3

    gem install fakes3

Then you can start the fakes3 server

    fakes3 --root=/var/tmp/fakes3 --port=10453

that will open port at 10453 and store data at /var/tmp/fakes3

Editing /etc/hosts

To redirect traffic back to localhost, add the following line:

127.0.0.1 fakes3.local testme.waterworld.com.hk.f

Continue Reading