安全曾让Java蒙羞,安全也让Java重获新生。在2014 Pwn20wn黑客大会上,Java成为唯一没有被攻破的平台。而在2015的会议中,Pwn20wn甚至没有把Java列在攻击名单上。


另一Java受惠者是Twitter。一开始Twitter是用Ruby on Rails编写的,但是随着用户数的增长RoR逐渐显得力不从心。Fail Whale(失败鲸)的宕机画面预示着瓶颈问题亟需解决。在2012年,Twitter从RoR转向了Java和Scala,而失败鲸从此灭绝了。


ReSnap – A Smart Automated Photo Book Creation Platform

ReSnap – A Smart Automated Photo Book Creation Platform

ReSnap, a company that automatically creates a book of photographs from a range of sources, has announced an update for its beta platform, with a revamped platform that allows you to upload photos from local storage – it will then automatically pick the best images from the selection without you having to do anything.

Hello world on HomeKit

I just setup a HomeKit apps on my home, using Apple Siri to control my television.

First, need a smart home device, for example Sony Bravia TV which connected to a home WIFI. Second, requires a HomeKit Server talking HomeKit Protocol. This server will interact with other smart home device registered as accessories. Third, requires a HomeKit client installed on mobile, which talking to HomeKit Server, adding any accessories available from HomeKit server. In usual setup, HomeKit server can installed on Raspberry PI, but I don’t have, use my Mac to host it.

The following procedures will help to setup.

1) Get a Mac with Node JS installed. Get a Apple licensed developer program.

2) Download a HomeKit Demo Swift based project, run it on your mobile. Download at

3) Download a HomeKit Server, I am homebridge. It is a Node.JS based server. Download at

4) Download Bravia Controlled library which is also Node.JS based. Download at

5) Follow instruction on how to control Bravia TV by using the library. And then, you may build a HTTP based interface around the Bravia library. And then, you may program HomeKit server apps, add a new accessories, and then send the command requests to Bravia Server via HTTP (Turn on/off TV). The last part is much more tricky, to setup HomeKit client talks to HomeKit server.

6) Important note, once you had HomeKit client installed, navigate to one of accessories, look for the service name, this is the name Siri will look and map into. Name it as “television”, or some fancy name, which you will tell Siri to look for and do the action.

7) After that, if everything goes well, you can turn on your Siri, and say “Siri, turn on television”. Then your television magically turned on. Enjoy.

The problems on installing node-ffi on Mac

I am installing NativeScript on my local Mac and requiring install node-ffi.

I am facing problem as could not recognize libtool -static during installation of node-ffi.

I found out that I had two version of libtool installed, one is for GNU libtool installed via brew install libtool (required by ARDrone3 SDK), and then another one in XCode developer tool. So I had to find way to switch into XCode developer tool.

On my Mac, I had to unlink or remove /usr/bin/libtool and /usr/local/bin/libtool, and then build symlink again as

ln -s /Applications/ /usr/bin/libtool

Then rerun npm install -g ffi, finally, it succeeds.

This is the error screen.

node-ffi error screen

This is the success screen.

node-ffi success screen

This issue takes me 4 hours of findings, googling, uninstall / reinstall libtool, node-gyp and finally found the root cause. I even tried to install it in Cloud9, but found that Cloud9 is a Ubuntu and not Mac, so the installation result do not have Mac built binaries, so cannot just copy the result from Cloud9 to my Mac. Everything must be built well on the Mac.