2015年12月13日星期日

Driver's FAQ

My Dad is learning to drive these days. I've found him a coach and accompanied him through his first lesson. Like almost all other coaches here in China, this coach just told him what to do without explaining reasons. If being asked, he would just say the car wouldn't run properly if you don't proceed as he instructed.

I don't blame him. It reminded me of my days of learning driving. I had to gone through a lot of materials to basically understand how everything is put together, and honestly these are not easy stories to tell. So here I'm trying to explain these different pieces through a series of questions and my understandings. I don't call them answers because they are literally just my understandings and I don't major anywhere near car engineering, so they could very well be wrong. If any of you readers spotted that, please leave a message and I'll be really grateful.

I intend to have my Dad read the stuff some day so I'll go with Chinese.

1. 速度到底是个啥东西?

2. 如果一个东西不受到任何外力,它会咋样(牛顿第一运动定律)?

3. 如果一个东西受到一定外力,它会咋样(牛顿第二运动定律)?

4. 变速箱是干啥的?是不是汽车一定要有变速箱?

5. (手动挡)起步的时候为啥快速离合器汽车就熄火了?

5. (手动挡)是不是一定要用一挡起步?五挡能不能起步?

6. (手动挡)在抬起离合器——保持半联动——松开离合器的过程中,到底发生了什么事情?

2015年10月20日星期二

Login shell vs non-login shell

A very good note with regard to login shell and non-login shell - http://unix.stackexchange.com/questions/38175/difference-between-login-shell-and-non-login-shell. It basically covers every aspect that needs to be known, along with relevant configuration files under each circumstance, and notably the behaviour of the Terminal app in OS X in the comments area.

Update 2023: Another relevant blog post emphasizes the sequences that startup files are triggered in each manner. It also offers intuitive scenarios when different manners should execute.

2015年10月14日星期三

How does https work

We've forever been told that https means safe and secure. But how exactly? Here are some posts that are quite helpful to that end.

How does SSL/TLS work?

How does HTTPS actually work?

How does SSL really work?

2015年9月16日星期三

Adapter or adaptor?

To those who haven't yet realised the difference, it's the e or o at the last but one position.

My question is, which spelling is correct, or more common?

It seems that I'm not the only one that's been wondering.

From http://grammarist.com/spelling/adapter-adaptor/, the writer concluded that these two could be used interchangeably, in all varieties of English and for every meaning of the word.

From http://english.stackexchange.com/questions/22537/which-is-the-proper-spelling-adapter-or-adaptor, the writer asked the same question only because his team couldn't reach an agreement in terms of how to name their piece of software. The experience does sound familiar. Years ago when Eric and I were still postgraduate students and working on a communication platform project, we had the same argument. Silly, now it seems. At the time I ended up keeping my favourable spelling in my part of code and he keeping the other way in his.

For me, at this point, I think I'd go for adapter as it looks better, even though adaptor is more convenient to be typed, as you could type the previous t with your left hand and the coming o with your right hand, and the next r again with your left, unlike with adapter you need to type three consecutive letters all with your left.

2015年9月5日星期六

Bash helpers

I didn't realise until very recently that Bash shipped with Yosemite is a rather old version - 3.2, given that Bash 4 has been around for quite some time. I then installed a new version through Homebrew and configured it as my login shell.

During my brew search for the new bash, two more items drew specific attention of mine - bash-completion and bash-git-prompt. I've always liked it when I typed "git checkout ma" and pressed Tab, "git checkout master" got filled out. Somehow it wasn't working that way in my Mac, until bash-completion started doing business.

Bash-git-prompt is also a nice piece of software that configures the shell prompt to display git related info (branch, status, etc), when working in a git repository of course.

2015年8月31日星期一

Changing password for "local items" keychain in OS X

Again, note time.

I changed the login password in my Mac. At first I did it through the Users & Groups panel from System Preferences, but it didn't seem to have taken any effect, or maybe there had been some errors in the process and I just neglected it. Anyway, I tried again through web and succeeded.

But after a reboot, quite a lot of applications started to ask for password to unlock the Local Items keychain, which I assume was because the password for Local Items keychain was not synchronised with the login password. To make things worse, if you right click the Local Items keychain, there is nothing available to change the password from the menu.

Before long I found this one - https://discussions.apple.com/thread/5473260, and it helped solve the issue. It turns out that the iCloud keychain is either called "Local Items" if you don't have syncing enabled or "iCloud" if you enabled iCloud keychain sync. Lock the login keychain then unlock it again would trigger a dialogue where the password for Local Items keychain could be changed.

2015年8月26日星期三

Proxy network traffic for vagrant VMs

Thanks to the shitty network condition here people have to fight their way to the INTERNET whenever they are looking for something cool.

It has come to vagrant this time. Have been trying https://github.com/UtahDave/salt-vagrant-demo for a simple salt setup. It's already got functional code incorporated. But guess what, it needs free INTERNET access from within vagrant VMs. Luckily a bit of digging led me to https://github.com/tmatilai/vagrant-proxyconf. Nice piece of work that just works!

2015年8月6日星期四

Getting rid of BES and JAMF

I'm not familiar with any of these. So don't try and ask me what they stand for. I don't know, or care. But I do know they both have something to do with endpoint management, which in layman's terms, is watching and controlling your computer remotely (my Mac in this case), banning you from doing anything they don't approve of. Don't get me wrong here. I'm not totally against the idea of endpoint management. It's crucial to enterprise IT. Just that some of the management policies really piss me off.

So I decided to stop them. After some trial and error I finally came up with the following.

Stopping BES:
--- Library_LaunchDaemons/BESAgentDaemon.plist 2015-07-15 01:00:15.000000000 +0800
+++ /Library/LaunchDaemons/BESAgentDaemon.plist 2015-07-15 01:00:21.000000000 +0800
@@ -5,7 +5,7 @@
  <key>Label</key>
  <string>com.bigfix.BESAgent</string>
  <key>OnDemand</key>
- <false/>
+ <true/>
  <key>ProgramArguments</key>
  <array>
  <string>/Library/BESAgent/BESAgent.app/Contents/MacOS/BESAgent</string>

Stopping JAMF:
diff -ruN Library_Application_Support_JAMF_ManagementFrameworkScripts/StartupScript.sh /Library/Application Support/JAMF/ManagementFrameworkScripts/StartupScript.sh
--- Library_Application_Support_JAMF_ManagementFrameworkScripts/StartupScript.sh 2015-08-05 21:12:03.000000000 +0800
+++ /Library/Application Support/JAMF/ManagementFrameworkScripts/StartupScript.sh 2015-08-05 21:23:04.000000000 +0800
@@ -1,15 +1,15 @@
 #!/bin/sh

-## Ensure the JSS is available
-/usr/sbin/jamf checkJSSConnection
-
-## Log the event to the JSS
-/usr/sbin/jamf log -action startup
-
-## Check for policies on the JSS
-/usr/sbin/jamf policy -action startup
-
-## Start SSH
-/usr/sbin/jamf startSSH
+### Ensure the JSS is available
+#/usr/sbin/jamf checkJSSConnection
+#
+### Log the event to the JSS
+#/usr/sbin/jamf log -action startup
+#
+### Check for policies on the JSS
+#/usr/sbin/jamf policy -action startup
+#
+### Start SSH
+#/usr/sbin/jamf startSSH

 exit 0
diff -ruN Library_Application_Support_JAMF_ManagementFrameworkScripts/loginhook.sh /Library/Application Support/JAMF/ManagementFrameworkScripts/loginhook.sh
--- Library_Application_Support_JAMF_ManagementFrameworkScripts/loginhook.sh 2015-08-05 21:12:03.000000000 +0800
+++ /Library/Application Support/JAMF/ManagementFrameworkScripts/loginhook.sh 2015-08-05 21:23:21.000000000 +0800
@@ -1,25 +1,25 @@
 #!/bin/sh

-## Ignore the casperscreensharing user
-if [ "$1" == "casperscreensharing" ];
-then
- exit 0;
-fi
-
-## Verify that the JSS is available
-if /usr/sbin/jamf checkJSSConnection -retry 0 ;
-then
-
- ## Log the event to the JSS
- /usr/sbin/jamf log -action login -username "$1" &
-
- ## Check for policies on the JSS
- /usr/sbin/jamf policy -action login -username "$1" &
-
-else
-
- /usr/sbin/jamf policy -action login -username "$1" -offline &
-
-fi
+### Ignore the casperscreensharing user
+#if [ "$1" == "casperscreensharing" ];
+#then
+# exit 0;
+#fi
+#
+### Verify that the JSS is available
+#if /usr/sbin/jamf checkJSSConnection -retry 0 ;
+#then
+#
+# ## Log the event to the JSS
+# /usr/sbin/jamf log -action login -username "$1" &
+#
+# ## Check for policies on the JSS
+# /usr/sbin/jamf policy -action login -username "$1" &
+#
+#else
+#
+# /usr/sbin/jamf policy -action login -username "$1" -offline &
+#
+#fi

 exit 0
diff -ruN Library_Application_Support_JAMF_ManagementFrameworkScripts/logouthook.sh /Library/Application Support/JAMF/ManagementFrameworkScripts/logouthook.sh
--- Library_Application_Support_JAMF_ManagementFrameworkScripts/logouthook.sh 2015-08-05 21:12:03.000000000 +0800
+++ /Library/Application Support/JAMF/ManagementFrameworkScripts/logouthook.sh 2015-08-05 21:23:30.000000000 +0800
@@ -1,26 +1,26 @@
 #!/bin/sh

-## Ignore the casperscreensharing user
-if [ "$1" == "casperscreensharing" ];
-then
- exit 0;
-fi
-
-## Verify that the JSS is available
-if /usr/sbin/jamf checkJSSConnection -retry 1 ;
-then
-
- ## Log the event to the JSS
- /usr/sbin/jamf log -action logout -username "$1"
-
- ## Check for policies on the JSS
- /usr/sbin/jamf policy -action logout -username "$1"
-
-else
-
- ## Check for policies on the JSS
- /usr/sbin/jamf policy -action logout -username "$1" -offline
-
-fi
+### Ignore the casperscreensharing user
+#if [ "$1" == "casperscreensharing" ];
+#then
+# exit 0;
+#fi
+#
+### Verify that the JSS is available
+#if /usr/sbin/jamf checkJSSConnection -retry 1 ;
+#then
+#
+# ## Log the event to the JSS
+# /usr/sbin/jamf log -action logout -username "$1"
+#
+# ## Check for policies on the JSS
+# /usr/sbin/jamf policy -action logout -username "$1"
+#
+#else
+#
+# ## Check for policies on the JSS
+# /usr/sbin/jamf policy -action logout -username "$1" -offline
+#
+#fi

 exit 0

--- Library_LaunchDaemons/com.jamfsoftware.jamf.daemon.plist 2015-08-05 18:57:41.000000000 +0800
+++ /Library/LaunchDaemons/com.jamfsoftware.jamf.daemon.plist 2015-08-05 19:03:07.000000000 +0800
@@ -7,7 +7,7 @@
  <key>GroupName</key>
  <string>wheel</string>
  <key>KeepAlive</key>
- <true/>
+ <false/>
  <key>Label</key>
  <string>com.jamfsoftware.jamf.daemon</string>
  <key>Nice</key>
@@ -20,7 +20,7 @@
  <string>-monitorNetworkStateChanges</string>
  </array>
  <key>RunAtLoad</key>
- <true/>
+ <false/>
  <key>UserName</key>
  <string>root</string>
  <key>WorkingDirectory</key>

--- Library_LaunchDaemons/com.jamfsoftware.startupItem.plist 2015-08-05 18:57:41.000000000 +0800
+++ /Library/LaunchDaemons/com.jamfsoftware.startupItem.plist 2015-08-05 19:03:24.000000000 +0800
@@ -7,7 +7,7 @@
  <key>LaunchOnlyOnce</key>
  <true/>
  <key>RunAtLoad</key>
- <true/>
+ <false/>
  <key>ProgramArguments</key>
  <array>
  <string>/Library/Application Support/JAMF/ManagementFrameworkScripts/StartupScript.sh</string>

--- Library_LaunchDaemons/com.jamfsoftware.task.1.plist 2015-08-06 00:58:20.000000000 +0800
+++ /Library/LaunchDaemons/com.jamfsoftware.task.1.plist 2015-08-06 00:59:31.000000000 +0800
@@ -12,7 +12,7 @@
  <string>300</string>
  </array>
  <key>StartInterval</key>
- <integer>900</integer>
+ <integer>0</integer>
  <key>UserName</key>
  <string>root</string>
 </dict>

--- Library_LaunchAgents/com.jamfsoftware.jamf.agent.plist 2015-08-05 19:04:52.000000000 +0800
+++ /Library/LaunchAgents/com.jamfsoftware.jamf.agent.plist 2015-08-05 19:05:36.000000000 +0800
@@ -5,7 +5,7 @@
  <key>AbandonProcessGroup</key>
  <true/>
  <key>KeepAlive</key>
- <true/>
+ <false/>
  <key>Label</key>
  <string>com.jamfsoftware.jamf.agent</string>
  <key>Nice</key>
@@ -15,7 +15,7 @@
  <string>/usr/sbin/jamfAgent</string>
  </array>
  <key>RunAtLoad</key>
- <true/>
+ <false/>
  <key>WorkingDirectory</key>
  <string>/usr/sbin</string>
 </dict>

Update: recent JAMF versions seem to have updated their code layout. So the diffs should read:
--- +Library+Application_Support+JAMF+ManagementFrameworkScripts/loginhook.sh 2015-10-22 15:54:56.000000000 +0800
+++ /Library/Application Support/JAMF/ManagementFrameworkScripts/loginhook.sh 2015-10-22 15:56:30.000000000 +0800
@@ -1,25 +1,25 @@
 #!/bin/sh

-## Ignore the casperscreensharing user
-if [ "$1" == "casperscreensharing" ];
-then
- exit 0;
-fi
-
-## Verify that the JSS is available
-if /usr/local/jamf/bin/jamf checkJSSConnection -retry 0 ;
-then
-
- ## Log the event to the JSS
- /usr/local/jamf/bin/jamf log -action login -username "$1" &
-
- ## Check for policies on the JSS
- /usr/local/jamf/bin/jamf policy -action login -username "$1" &
-
-else
-
- /usr/local/jamf/bin/jamf policy -action login -username "$1" -offline &
-
-fi
+### Ignore the casperscreensharing user
+#if [ "$1" == "casperscreensharing" ];
+#then
+# exit 0;
+#fi
+#
+### Verify that the JSS is available
+#if /usr/local/jamf/bin/jamf checkJSSConnection -retry 0 ;
+#then
+#
+# ## Log the event to the JSS
+# /usr/local/jamf/bin/jamf log -action login -username "$1" &
+#
+# ## Check for policies on the JSS
+# /usr/local/jamf/bin/jamf policy -action login -username "$1" &
+#
+#else
+#
+# /usr/local/jamf/bin/jamf policy -action login -username "$1" -offline &
+#
+#fi

 exit 0
--- +Library+Application_Support+JAMF+ManagementFrameworkScripts/logouthook.sh 2015-10-22 15:55:04.000000000 +0800
+++ /Library/Application Support/JAMF/ManagementFrameworkScripts/logouthook.sh 2015-10-22 15:56:51.000000000 +0800
@@ -1,26 +1,26 @@
 #!/bin/sh

-## Ignore the casperscreensharing user
-if [ "$1" == "casperscreensharing" ];
-then
- exit 0;
-fi
-
-## Verify that the JSS is available
-if /usr/local/jamf/bin/jamf checkJSSConnection -retry 1 ;
-then
-
- ## Log the event to the JSS
- /usr/local/jamf/bin/jamf log -action logout -username "$1"
-
- ## Check for policies on the JSS
- /usr/local/jamf/bin/jamf policy -action logout -username "$1"
-
-else
-
- ## Check for policies on the JSS
- /usr/local/jamf/bin/jamf policy -action logout -username "$1" -offline
-
-fi
+### Ignore the casperscreensharing user
+#if [ "$1" == "casperscreensharing" ];
+#then
+# exit 0;
+#fi
+#
+### Verify that the JSS is available
+#if /usr/local/jamf/bin/jamf checkJSSConnection -retry 1 ;
+#then
+#
+# ## Log the event to the JSS
+# /usr/local/jamf/bin/jamf log -action logout -username "$1"
+#
+# ## Check for policies on the JSS
+# /usr/local/jamf/bin/jamf policy -action logout -username "$1"
+#
+#else
+#
+# ## Check for policies on the JSS
+# /usr/local/jamf/bin/jamf policy -action logout -username "$1" -offline
+#
+#fi

 exit 0
--- +Library+Application_Support+JAMF+ManagementFrameworkScripts/StartupScript.sh 2015-10-22 15:54:25.000000000 +0800
+++ /Library/Application Support/JAMF/ManagementFrameworkScripts/StartupScript.sh 2015-10-22 15:56:04.000000000 +0800
@@ -1,12 +1,12 @@
 #!/bin/sh

-## Ensure the JSS is available
-/usr/local/jamf/bin/jamf checkJSSConnection
-
-## Log the event to the JSS
-/usr/local/jamf/bin/jamf log -action startup
-
-## Check for policies on the JSS
-/usr/local/jamf/bin/jamf policy -action startup
+### Ensure the JSS is available
+#/usr/local/jamf/bin/jamf checkJSSConnection
+#
+### Log the event to the JSS
+#/usr/local/jamf/bin/jamf log -action startup
+#
+### Check for policies on the JSS
+#/usr/local/jamf/bin/jamf policy -action startup

 exit 0
--- +Library+LaunchAgents/com.jamfsoftware.jamf.agent.plist 2015-10-22 16:05:56.000000000 +0800
+++ /Library/LaunchAgents/com.jamfsoftware.jamf.agent.plist 2015-10-22 16:06:21.000000000 +0800
@@ -5,7 +5,7 @@
  <key>AbandonProcessGroup</key>
  <true/>
  <key>KeepAlive</key>
- <true/>
+ <false/>
  <key>Label</key>
  <string>com.jamfsoftware.jamf.agent</string>
  <key>Nice</key>
@@ -15,7 +15,7 @@
  <string>/usr/local/jamf/bin/jamfAgent</string>
  </array>
  <key>RunAtLoad</key>
- <true/>
+ <false/>
  <key>WorkingDirectory</key>
  <string>/usr/local/jamf/bin</string>
 </dict>
--- +Library+LaunchDaemons/com.jamfsoftware.jamf.daemon.plist 2015-10-22 16:00:15.000000000 +0800
+++ /Library/LaunchDaemons/com.jamfsoftware.jamf.daemon.plist 2015-10-22 16:02:09.000000000 +0800
@@ -7,7 +7,7 @@
  <key>GroupName</key>
  <string>wheel</string>
  <key>KeepAlive</key>
- <true/>
+ <false/>
  <key>Label</key>
  <string>com.jamfsoftware.jamf.daemon</string>
  <key>Nice</key>
@@ -20,7 +20,7 @@
  <string>-monitorNetworkStateChanges</string>
  </array>
  <key>RunAtLoad</key>
- <true/>
+ <false/>
  <key>UserName</key>
  <string>root</string>
  <key>WorkingDirectory</key>
--- +Library+LaunchDaemons/com.jamfsoftware.startupItem.plist 2015-10-22 16:00:21.000000000 +0800
+++ /Library/LaunchDaemons/com.jamfsoftware.startupItem.plist 2015-10-22 16:03:00.000000000 +0800
@@ -7,7 +7,7 @@
  <key>LaunchOnlyOnce</key>
  <true/>
  <key>RunAtLoad</key>
- <true/>
+ <false/>
  <key>ProgramArguments</key>
  <array>
  <string>/Library/Application Support/JAMF/ManagementFrameworkScripts/StartupScript.sh</string>
--- +Library+LaunchDaemons/com.jamfsoftware.task.1.plist 2015-10-22 16:00:28.000000000 +0800
+++ /Library/LaunchDaemons/com.jamfsoftware.task.1.plist 2015-10-22 16:03:40.000000000 +0800
@@ -12,7 +12,7 @@
  <string>300</string>
  </array>
  <key>StartInterval</key>
- <integer>900</integer>
+ <integer>0</integer>
  <key>UserName</key>
  <string>root</string>

 </dict>

2015年7月11日星期六

IBM Firefox failed to be updated

Just for the record, IBM does not develop Firefox. It's just a rebranded version of Firefox ESR, still pure Mozilla.

When installing Mac@IBM App Store (MIAS), the IBM Firefox got installed along the way, however much you like the vanilla Firefox and reluctant you feel for the customised version. For the past few days it kept reminding me of updating to the version 31.8.0. But every time I opened the update dialog and let it proceed, it stuck at contacting the update server. The same symptom has been reported a lot in the IBM Apple / Mac Community, until I found this one.

It turned out that /Applications/IBM Firefox.app is owned by root. No wonder it couldn't be updated when running by an unprivileged user. After running the following command and launching Firefox again, it was successfully updated!
sudo chown -R tony:staff IBM\ Firefox.app


Update 2015/09/18: I've been setting up another MacBook Pro these days and found happily that MIAS now installs Firefox with correct permissions.

2015年7月6日星期一

Installing Eclipse and Rational Team Concert on Mac OS X

My job involves dealing with Rational Team Concert (RTC) a lot. So switching to Mac OS X means to establish an RTC working environment (Eclipse + RTC client extension) as I have on Linux. Years ago I wrote a tutorial (on Google Docs as I recall) on how to achieve this on Linux. Now on OS X it's pretty much the same process.
  1. Install Java. Hmm... Pity that I didn't do this manually. My current Java was installed automatically along with Mac@IBM App Store. Believe me I'm a control freak in terms of my computer. So if I had the chance I'd have installed it manually. But really the Mac@IBM App Store installation didn't provide many options other than clicking next.
  2. Install Eclipse. I've tried both the Luna (4.4) version and the Mars (4.5) version. They are pretty much the same in terms of installation, both involving extracting the tar ball at a specific directory (e.g. /opt). The difference is the file hierarchy. Pay specific attention to where the directory dropins and binary eclipse are. We will be using them at a later time. Another difference is that Mars ships with an installer which I didn't use because of, again, the control issue.
  3. Install RTC client.
    1. Download RTC client. If you are to connect to more than one RTC server, download the client version that matches the oldest server, because an old RTC client could get along with a newer server but not the other way around. For any specific version of RTC client, jazz.net provides several installation options. The only one that could be consumed in a drop-in approach is called Client for Eclipse xxx IDE, under the IBM Installation Manager Repositories category.
    2. Extract RTC client. To be consumed in a drop-in manner the extension needs to be put in certain directory structure - features and plugins directories under eclipse. So after extraction of the zip file, find features and plugins inside im/repo/rtc-client-full-p2-offering/offering-repo and put them under eclipse. Whatever left in im is of no interest to us.
      /opt/eclipse-ext/rtc
      └── eclipse
          ├── features
          └── plugins
    3. Configure Eclipse to use RTC client. Put in the dropins directory a text file containing the path of the RTC client.
      /opt/Eclipse.app
      └── Contents
          ├── Eclipse
          │   ├── dropins
          │   │   └── rtc.txt
          └── MacOS
              └── eclipse

      [tony@tonys-mbp ~]$ cat /opt/Eclipse.app/Contents/Eclipse/dropins/rtc.txt
      path=/opt/eclipse-ext/rtc
  4. Launch Eclipse. The binary is located in Eclipse.app/Contents/MacOS. Of course certain parameters are allowed and what I'd use is
    /opt/Eclipse.app/Contents/MacOS/eclipse -data "${data_dir}" -vmargs -Xmx1024m

Update 2015/09/22: As of the original writing the RTC client version I was using was 5.0.2. Today I tried RTC 6.0 and it worked perfect as well with the aforementioned way of installation.

2015年6月19日星期五

UTF-8 handling on Mac OS X terminals

Ran into something strange today. I ssh'ed from my new shiny MacBook Pro to my old desktop, where I have some files with names containing Chinese characters. All Chinese characters were presented as question marks when I ran ls.

Been Googling a bit before I realised that locale settings are different on these two platforms. I added the following two lines into ~/.bash_profile on my OS X and everything then became familiar again.

export LANG=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8

2015年6月18日星期四

How to install shadowsocks on Mac OS X Yosemite

Another place holder that I'd like to fill in when I have time (cliche, I know).

Basically it involves installing python with Homebrew (standard procedure) and then installing shadowsocks with pip, as on a Linux box.

2015年6月3日星期三

A vs. An

I was writing something else when I mentioned my cellphone. The questions is, should it be a HTC One or an HTC One?

Actually I've had this question for quite some time, only this time I took action and investigated it finally.

Here is what I find - http://www.englishpage.com/articles/a-vs-an.htm.

USE 5 & 6 clearly explains that it's the sound not the spelling that counts.

So an HTC One it is.

2015年6月2日星期二

How to import Nokia S40 contacts to iCloud

(Again, a placeholder that I'll explain in detail when I have time.)

Why I chose iOS over Android for Mom and Dad

In a nutshell, it's all about use cases.

For the record, I'm no fan of Apple. I myself am using an HTC One M7 and I think it terrifically suits my need. One of the many things that truly distinguishes Android from iOS is the ability for applications to run in the background. Many argue that this is good, while probably equally many believe otherwise. I think it's more of a differentiation of design logic, not some sort of advantage or drawback. This kind of differentiation provides different use cases with 'best' solutions. So the old saying applies - there is no best, only the most suitable.

And when it comes to daily usage for Mom and Dad, I believe iOS is the better option.

Security is the major concern. Android is known as the 'open' one. The openness allows application installation from practically anywhere. It could mean more danger when it comes with the twisted many-app-market situation here in the mainland. While I could probably identify a malware when there is one being installed, I don't think Mom and Dad could or should even bother. With iOS, one could only install applications from the neat and safe App Store. And Apple takes the responsibility of reviewing the legitimacy of the applications they provide.

iOS comes easier in terms of usability. I think the phrase I'm looking for is 'everything just works'.

iPhones are generally better made, in terms of display quality, voice quality, photo shooting, etc. Everything is good with an iPhone. They are not just acceptably good, top-notch good. One could probably argue that Samsung Galaxy S6 is the best in terms of photo shooting nowadays, with the fancy test out there and stuff, but iPhone 6 probably comes 2nd or 3rd. And it's the same situation with basically every aspect of an iPhone. So when combined, even if iPhone is not the best, it'll be quite competitive with nothing compromised.

2015年6月1日星期一

How to upgrade kernel for Ubuntu LTS

Usually the kernel of a Long Term Support (LTS) Ubuntu remains stable (as in no dramatic change) throughout its supported lifecycle. In the cases of security breaches there will be update accordingly, but the version (like 3.13 for Ubuntu 14.04) stays the same.

Under certain circumstances this might not be ideal and an upgraded kernel (3.16 for Ubuntu 14.04 as of this writing) might be desired, in which case the latest supported kernel can be installed by following this doc - https://wiki.ubuntu.com/Kernel/LTSEnablementStack.