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

ADT failed to launch after updating Android SDK
Water
|
03/24/2014
|

Android SDK 22.6

Just trying to update Android Developer Tool(ADT) and Android SDK. After updated Android SDK to 22.6, ADT failed to launch:

Android SDK 22.6

Continue Reading

Block, weakSelf and strongSelf
Water
|
02/26/2014
|

Block is powerful in Objective-C. But there is a very stupid problem called cyclic retention pitfall, that a block locked an object so that the object will never be release.

For example, in the function:

NSBlockOperation *op = [[[NSBlockOperation alloc] init] autorelease];
[ op addExecutionBlock:^ {
    [self doSomething];
    [self doMoreThing];
} ];
[someOperationQueue addOperation:op];

When t

Continue Reading