Docker containers are just like a computer, the networking between host and containers is affected by the firewall. My iptables has a default DROP all policy, but it will make the Containers cannot communicate with the host. Here is the fix you’ll need. Continue reading
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
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
With a 2K resolution 5.96 inch display, Qualcomm Snapdragon 805 CPU, 3GB of memory, 3220 mAh battery and 13Mega-pixels f2.0 camera, Nexus 6 is still one of the high-end phones on the market Continue reading
This article will cover how to use the Vibrator in Android.
Firstly, in your AndroidManifest.xml, you must have this line under the root element, otherwise you will get a Runtime Exception
<uses-permission android:name="android.permission.VIBRATE" />
if you just want to vibrate it once, this is the simplest example Continue reading
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
The problem is that you forgot to change the email to your work email before you commit your code, so you’re exposing your personal email. How to change it? Continue reading
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
Envoy is a simple tool developed by the Laravel team. It is designed to perform task like deploying a website on a remote server, e.g. your VPS.
envoy run deploy