Posts

How to use ntpd to setup and sync Hong Kong Time From Gov 2018

Image
First install NTP using: yum install -y ntpd (CentOS) or sudo apt install -y ntpd (Ubuntu)Edit the ntp config file.  Under CentOS it is /etc/ntp.conf
Find the section where it shows:server 0.centos.pool.ntp.org iburstserver 1.centos.pool.ntp.org iburstserver 2.centos.pool.ntp.org iburstserver 3.centos.pool.ntp.org iburstComment it out (Adding # at the beginning of each line):# server 0.centos.pool.ntp.org iburst# server 1.centos.pool.ntp.org iburst# server 2.centos.pool.ntp.org iburst# server 3.centos.pool.ntp.org iburstAdd the following line (as of 10 Dec 2018 from pool.ntp.org).  No need to put # at the beginning.  For latest server list please go to: https://www.ntppool.org/zone/hkserver stdtime.gov.hk preferserver 2.hk.pool.ntp.orgserver 2.asia.pool.ntp.orgserver 0.asia.pool.ntp.orgSave the file and exit.Final output:Stop the service first: systemctl stop ntpd.serviceAfter stopping the service, trigger the synchronization by typing: ntpd -gq to force the sync.  If success, it will …

How To Edit Paypal.me Business Description in Paypal?

Image
To people who have difficulties in finding where is the place to edit your Paypal.me business description and other settings, here is the step by step method with screenshots (Text in Chinese, but the concept should be the same):

- Go to Tools > Request for payment (Yes it is super stupid!)

- On the bottom right hand corner, you can see (Manage your Paypal.Me Profile)

- Click on the top left hand corner "Manage Your Profile":  Info hidden for security purpose.

- In your Paypal.me profile, click the "Update" link beside your personal message. - Finally, edit your info and save!
One of the most stupid thing is this: you cannot edit your paypal.me profile while clicking the gear icon on top right.  You cannot find any link that allows you to edit your Paypal.me description.
There are other stupid thing also: it is difficult to find out where to manage your periodic payments also ( I know where it is finally after searching on Google!).  But that doesn't matter.

香港銀行編號及分行編號一覽表 2018

若各位想查詢香港所有銀行及分行編號的列表,請下載由香港銀行同業結算有限公司網頁的列表:

XLS - 按此下載

PDF - 按此下載

或直接到該公司的網頁查詢。

[Solved] CodeIgniter/CI 3 - 404 Page not found (with or without subdirectory) problem

Check the following if you have 404 Page Not Found error when you deploy your CI application to Linux, while there is no problem under MS Windows.


Check if your controller file name and class name inside that file have identical (not ONLY the same, but Identical) name.  For example, if your controller class name is MyController, your controller file name must be: MyController.php.  mycontroller.php does not work, Mycontroller.php does not work.  It MUST BE MyController.php, identical to class name MyController.
Hope it helps.

[Solved]LiveAgent (LADesk) Rules HTTP Request What is inside HTTP Body?

Image
In short, if you don't know what should be put inside the HTTP Body field when you are using HTTP request as rules, here is the string that contains "Everything".

Just copy and paste the below code to your HTTP Body box and you will get everything sent from LA to your URL.



---- Start Here -------
initiator_id={$initiator_id}&initiator_username={$initiator_username}&initiator_firstname={$initiator_firstname}&initiator_lastname={$initiator_lastname}&last_in_ticket_agent_id={$last_in_ticket_agent_id}&last_in_ticket_agent_username={$last_in_ticket_agent_username}&last_in_ticket_agent_firstname={$last_in_ticket_agent_firstname}&last_in_ticket_agent_lastname={$last_in_ticket_agent_lastname}&conv_last_message={$conv_last_message}&conv_code={$conv_code}&conv_conversationid={$conv_conversationid}&conv_datecreated={$conv_datecreated}&conv_datechanged={$conv_datechanged}&conv_datedue={$conv_datedue}&conv_priority={$conv_prior…

Microsoft BotFramework - Why my image not show on FB?

One of the reason is because MS BotFramework is assuming you to use HTTPS for everything (link especially).
So if your message outgoing link is not HTTPS, you may not be able to show the image in your FB messenger.
Hope it helps someone.

Parsley.js - zh_HK/zh_CN is not available in the catalog

If you encounter:

zh_HK is not available in the catalog

or

zh_CN is not available in the catalog

error when you use caldera form under wordpress, or using it in standalone application, the problem is that parsley.js will load zh_HK.js (or zh_CN.js) in the web page.  However, in the i18n directory, there is no zh_HK.js.

Even worst, for TW and CN language, the file name is zh_tw.js and zh_cn.js.

And even more worst, inside zh_cn.js the name 'zh-cn' is used.

So to solve this problem, here are what I have done:

Duplicate a new file using "Save As..." from zh_tw.js to zh_HK.jsOpen zh_HK.js, change zh-hk to zh_HKRename zh_cn.js to zh_CN.jsOpen zh_CN.js, change zh-cn to zh_CN There will be no more javascript error.
Hope it helps.
Thank you.