Docker named volume explained

Named volume is a new feature since Docker 1.9, it allows you to manage persistent data more easily, and also the volume can be provided by other storage drivers such as Glusterfs instead of “just a directory on the host”. This new feature is particularly useful in production environment. (On the Dev side, I think we still need mounted volume) Continue reading

PHP Traits – why is it useful

I know I’m late into the game but I recently found that Traits in PHP is really useful. PHP Traits come in handy if you have some part of a class you wish to re-use in the future in another class, but you don’t want strict inheritance relationship.

What is Traits

PHP Trait defines a code segment that is simply copy-n-pasted into a class at compile time. It can contains variables, constants, methods, Continue reading

Install Jetty as a service on CentOS

It seems hard to find a complete step-by-step tutorial to install Jetty as a service (especially on CentOS), some of the tutorial online is somewhat outdated or does not work, so I will share what I’ve learnt. (painfully) Perhaps this tutorial will also be outdated at some point in the future, so I will state the current version of the software I use clearly. Continue reading

Software update failure saved by OSX Time Machine!

Today I was trying to upgrade the OS X on my Mac mini via the AppStore which seems harmless and seamless like every other small OS X updates. Unluckily it turned into a nightmare (almost).

I was not paying attention to the details of the Update, it was something like Command Line Tools, Combined update and an update on the Recovery Partition. The install was smooth, after I restart the computer Continue reading