Bluetooth wireless solution for older speaker — getting rid of the 3.5mm cable

I have an old car which doesn’t have a bluetooth music streaming functionality on its stereo system. But like most other cars, it does have a 3.5mm AUX port for you to play music from a Smart Phone to the car’s speakers through a male to male 3.5mm AUX cable. I have always wondered how I can get rid of the 3.5mm cable to make everything less cluttered. So far, I have come across the following solutions:-

1 – BTunes

BTunes is a small Bluetooth device which gives you the ability to play music wirelessly to your speaker or headphones. It comes with different models such as the 3.5mm or 2.5mm one, amongst the others for different headphone brands.


2 – TP-Link HA100

A Bluetooth Music Receiver from TP-Link. Powered by a USB micro-B to USB cable, you can simply connect your speaker to this device using the provided male-to-male 3.5mm cable. Out of the box, it also comes with a 3.5mm to RCA cable (the white and red audio cable) incase your speaker has that.

TP-Link HA100

3 – Tunai Firefly

Tunai Firefly is the latest product I found on the Internet. Seems to be a simple with a USB plug and a 3.5mm AUX plug on each end.

No longer receiving Apple SMS verification code

I enabled Two Step Authentication immediately after Apple provides this feature for their Apple members. Two step authentication basically means aside from your password, you also need a second trusted device to verify your identity. This can be a logged in Apple devices or phone number with SMS capability. If you somehow don’t have access to your second device, you will need a recovery code which was provided to you when you setup Two step authentication for the first time.

It was working totally fine until two weeks ago when I tried to login iTunes, iCloud or Apple ID management webpage, I no longer receive the SMS verification code. To make matters worse, I cannot find the recovery code. I have my Apple ID and password so I can login totally fine, but it just needs a security code via SMS to access the more sensitive information. I’m panicking, don’t know what to do, and decided to call AppleCare for assistance.

I told the AppleCare call centre operator that I have my Apple ID and password, and I just don’t receive any verification code via SMS, which is odd since I used to receive the codes perfectly fine. (Some operators will just say they can’t do anything from their end.) I called again the next day, the other operator escalated the case and transferred me to an AppleCare Senior Advisor.

She seemed to have more access than the call centre operator and could immediately see that all my trusted devices disappeared mysteriously on Apple’s side. She filed a case to the Apple Engineer. It seems to be the busiest time of the year so after two weeks of waiting, I tried to login iCloud again. YES!! An SMS notification appeared on my iPhone and I can access my iCloud again.

Thank you, Apple Support.

長期堅持打羽毛球 身體會發生哪些變化


打羽毛球的諸多好處 1、眼睛:堅持打球的人每天都有1小時候左右的時間眼睛直視遠方,這對眼睛是很好的放…

來源: 長期堅持打羽毛球,身體會發生哪些變化——送給那些長期堅持打羽毛球的朋友們 – Just 分享

CentOS / Ubuntu / Fedora 開機啟用或關閉 X Server GUI 界面

新版 CentOS / Ubuntu / Fedora 使用了 Systemd 系統服務管理,如電腦的用途為伺服器,關閉 GUI 界面能節省系統資源,方法如下:開啟終端機,輸入以下指令再重新啟動電腦即可:

systemctl set-default

要重新啟用 GUI 界面,則輸入:

systemctl set-default


Ubuntu 15.04 自動登入桌面設定方法

這個年頭 XFCE 桌面環境好像使用的人不多,但筆者的 Ubuntu 是安裝在 Raspberry Pi 2 上,雖說 CPU 時脈、1G RAM 比等都比第一代進步,但實際使用上如瀏覽網頁等仍然比較慢,利用 Raspberry Pi 作日常使用的桌面電腦幾乎不可能。廢話不多,新版 Ubuntu 使用 LightDM,設定方面跟 GDM 略有不同。

/etc/lightdm/lightdm.conf 新增一個純文字檔案,本人喜好 vim 命令列編輯器:

sudo vim /etc/lightdm/lightdm.conf

單按 i 鍵進入 insert (插入) 模式,貼上以下代碼,並更改登入名稱:


完成後按 ESC 鍵退出插入模式,輸入 :wq 及 ENTER 退出編輯器,然後重新啟動電腦即可自動登入。

How to install the latest Nginx 1.8.0 Stable on Ubuntu Raspberry Pi 2

I installed Ubuntu 15.04 on my Raspberry Pi 2 Model B using this image built by mrengles. I personally prefer Ubuntu over the default Raspbian Wheezy simply because their packages are more stable and up-to-date. However still, the repo has an older version of Nginx (1.6.2). To install the newest Nginx 1.8.0 stable, you will either have to build it from source or install a binary prebuilt by someone. After some googling, I found it here.

Add the ppa repository:

sudo add-apt-repository ppa:teward/nginx-stable-testing

You will see this message:

Staging PPA for nginx/stable PPA.

This contains all builds for the Stable PPA.  Good builds, bad builds, and old builds.  Please do not use this PPA unless you really know what you're doing.
 More info:
Press [ENTER] to continue or ctrl-c to cancel adding it

Follow the instruction and press [ENTER].

Go ahead and perform the normal apt-get update and apt-get install:

sudo apt-get update
sudo apt-get install nginx

You may edit the settings from /etc/nginx/nginx.conf and /etc/nginx/sites-available/default as required. Then start Nginx normally:

sudo service nginx start

Open your browser to see if that works.

為 Cloudflare 設定動態 DNS (DDNS)

在家裡架設小型伺服器,卻因為網路供應商只提供動態 IP 地址而感到煩惱?市面上有不少產品提供動態 IP 轉址,如 dydns 及 No-IP 等,不過今年迅速興起的 Cloudflare 提供快速且免費的 CDN 服務,有效提升網頁內容傳送速度,吸引不少中小企業、開發者及家庭用家使用。Cloudflare 本身沒有提供任何軟件方便使用者更新 IP 位址,但幸好它提供 Cloudflare API,利用第三方軟件或自行撰寫 Shell script 更新 IP。

利用 Shell Script 及 Crontab 定期更新 (Mac / Linux 適用)

使用 Shell Script 更新必須事先知道該域名的 DNS Record ID,執行以下指令以獲得所有域名的資訊:

curl -d 'a=rec_load_all' 
  -d 'tkn=CloudFlare_API_Key' 
  -d 'email=CloudFlare_Email_Address' 
  -d ''

更改 CloudFlare_API_Key 為你的 API Key,可以在 Cloudflare 賬戶管理中取得。
更改 CloudFlare_Email_Address 為你的登記電郵。
更改 為適用的域名。

你會獲得一堆 JSON 格式的文字,利用網上的 JSON 檢視工具以方便閱讀。

尋找適當的 name 及 type (A record) 及記下 rec_id。接著使用自選的文字編輯器建立 Shell script:

NEW_IP=`curl -s`
CURRENT_IP=`cat /var/tmp/current_ip.txt`

if [ "$NEW_IP" = "$CURRENT_IP" ]
        echo "No Change in IP Adddress"
        curl \
          -d 'a=rec_edit' \
          -d 'tkn=Cloudflare_API_Key' \
          -d 'email=Cloudflare_Email_Address' \
          -d '' \
          -d 'id=rec_id' \
          -d 'type=CloudFlare_Record_Type' \
          -d 'name=CloudFlare_Record_Name' \
          -d 'ttl=1' \
          -d "content=$NEW_IP"
        echo $NEW_IP > /var/tmp/current_ip.txt
  • 更改 CloudFlare_API_Key 為你的 API Key,
  • 更改 CloudFlare_Email_Address 為你的電郵,
  • 更改 為你的網域,
  • 更改 CloudFlare_Record_ID 為 JSON 結果中得 rec_id,
  • 更改 CloudFlare_Record_Type 為 A,也可以是 CNAME、AAAA、MX、SRV 等等,
  • 更改 CloudFlare_Record_Name 為你想設定為 DDNS 的子域名,如 www,但不包括。

把檔案放到你喜歡的地方,如 ~/Scripts,儲存為 (副檔名必須為 .sh)。把 設定為可執行檔案:

chmod +x

然後在 /var/tmp 建立一個空的 current_ip.txt 純文字檔案:

touch /var/tmp/current_ip.txt

建立自動排程,於 Terminal 終端機輸入

crontab -e

按一下 i 進入 insert 模式,並輸入

*/120 * * * * ~/Scripts/

120 代表每 120 分鐘更新一次,你可設定為更少數值,如 60 分鐘、30 分鐘或 5 分鐘。
然後按 Esc,再按 :wq 儲存並關閉修改器。

適用於 Windows 的 Cloudflare DDNS 更新軟件

以下軟件都能支援 Cloudflare 更新動態 IP 地址:

Macbook Pro 開機黑屏但有開機聲解決辦法

剛才啟動我的 Late 2013 Macbook Pro Retina 13″ 的時候有開機聲,但螢幕黑屏沒有任何顯示,按任何按鍵也沒有反應,關上屏幕亦不會自動關機。在網上 Google 一下找到解決辦法:重置電腦的 PRAM。給自己及其它找到這篇文章的人作參考。

  1. 將 Mac 關機。
  2. 在鍵盤上找到下列按鍵:Option、Command(⌘)、P 和 R。您需要在步驟 4 中同時按住這些按鍵。
  3. 將 Mac 開機。
  4. 立即按住 Option + Command + P + R 鍵。您必須在灰色螢幕出現之前按下此按鍵組合。繼續按住這些鍵直到 Mac 重新開機,且您第二次聽到開機聲音為止。
  5. 放開按鍵。