To check your file encoding/charset. Use the following command.
file --mime-encoding <filename>
Possible output:
<filename>: utf-8
To check your file encoding/charset. Use the following command.
file --mime-encoding <filename>
Possible output:
<filename>: utf-8
Previously i have setup a server with Nginx and MariaDB.
Run Drupal 7 in Nginx
But there is one problem in this setup. I cannot restart the MariaDB service. Whenever it is down, i have to restart the server instance.
At first, i thought the failure is caused by the modification of the /etc/mysql/my.cnf. So i try to restore the original my.cnf. The following solution helps you to restore the default package configuration file.
Continue reading Ubuntu – Recover package configuration file using apt-get
Haven’t worked with CentOS for a long time. Miss the time and the teammates in HKU CECID.
Here are the steps to install Alternative PHP Cache (APC) on CentOS.
1. Install the following packages.
yum install php-pear php-devel httpd-devel pcre-devel gcc make
Continue reading CentOS – Install Alternative PHP Cache (APC)
In Drupal, we can use a progress bar when uploading an image or file. But that needs a PHP PECL extension called uploadprogress. The following steps work for Ubuntu Precise (Ubuntu 12.04.1 LTS).
1. Install the php5-dev package.
Continue reading Ubuntu – Install PECL uploadprogress PHP extension on Nginx
We can install package easily in Ubuntu by the apt-get command. But sometimes we may want to find out what packages are available in the repositories as well as the package version.
To search a package, use the apt-cache search <name> command.
For example, apt-cache search nginx
Continue reading Ubuntu – Find Check package version without installation
Each Linux user may want to have timezone different from the server. In Ubuntu, you can set it using the tzselect command.
1. Run the tzselect command and select the continent or ocean.

Continue reading Ubuntu – Set Timezone on user level
A file system check in Linux is equivalent to chkdsk in Windows. It can only run on unmounted drive so if you want to run it on the next reboot, you can use the following command.
shutdown -rF now
Continue reading Linux – Schedule file system check on next reboot
If you like to have more customization options on the display of your Ubuntu, MyUnity will be one of you favourite application.
Browse the following link to install MyUnity.
apt://myunity
With MyUnity, you can customize the launcher which is located on the left hand side. You can even configure the settings of the Dash Home as well as the fonts.
Continue reading MyUnity – Extra theme settings for Ubuntu
The Ubuntu Tweak provides some desktop and systems configuration options which the default Ubuntu settings does not provide.

Continue reading Ubuntu Tweak – The must have configuration tools for Ubuntu
If you are a long time Windows user, the Ubuntu default graphical user interface which has the launcher on the left hand side may be a bit unfamiliar to you.

Continue reading Cinnamon – Windows-like start menu on Ubuntu