Monthly Archives: July 2013

How To Check Disk Usage in Linux Console?

To view the overall disk usage, you can use this following command df -h To view disk usage on each partition in the server (ex /home), you can use this following command du -sh /home/ To list all the subdirectory sizes under directory (ex /home), run the following command: du -sh /home/*

Setting WiFi on Raspberry PI

Setup the interface configuration sudo nano /etc/network/interfaces Normally the base configuration will look something like this auto lo iface lo inet loopback iface eth0 inet dhcp allow-hotplug wlan0 iface wlan0 inet manual wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf iface default inet dhcp Assuming you have a DHCP server on your LAN (normally your DSL/Cable router) use the following configuration,… Read More »

Twitter Bootstrap Typeahead

Here is the structure of the bootstrap typeahead script $(‘#search’).typeahead({ source: function (query, process) { // implementation }, updater: function (item) { // implementation }, matcher: function (item) { // implementation }, sorter: function (items) { // implementation }, highlighter: function (item) { // implementation }, }); 1. source This option specifies the data set… Read More »

How To Install PPTP VPN on VPS

This is a guide to install the pptp VPN service on your VPS. Please make sure that ppp module has been enabled for OpenVZ based VPS. Simply just check wheter the /dev/ppp is available or not. On Ubuntu OS Install the pptp server package sudo apt-get install pptpd On CentOS Install the pptp server package… Read More »

mPDF : Your web based PDF report

Looking for report for your web based application? mPDF would be one of the good option to choosed. mPDF Installation and setup Download latest mPDF version from the official website. Extract zipped file content to your defined folder and rename it to mpdf for better usage. You may also allow three catalogs to be written.… Read More »

Common Apache Tuning

Here are some tips how to optimized your apache setting. Some typical setting for apache in some different server specification: Apache Directive 1/4GiB 1GiB 2GiB 4GiB StartServers 2 8 16 32 MinSpareServers 1 4 8 16 MaxSpareServers 2 8 16 32 ServerLimit 8 64 128 256 MaxClients 8 64 128 256 MaxRequestsPerChild 0 0 0… Read More »

How to check your disk IO performance

The easiest way to check your disk io performance is by running the following command on command line dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync The result would be like this : ===================================== 16384+0 records in 16384+0 records out 1073741824 bytes (1.1 GB) copied, 19.0812 seconds, 56.3 MB/s ===================================== If the average result is above 25,… Read More »

Using TAR command on console

In linux, we are usualy using TAR to archive or extract files.. Here are the simple command you can run on the console. To archive with compression tar -czvf myarchive.tgz mydirectory/ To archive without compression tar -cvf myarchive.tar mydirectory/ To extract file with compression tar -xzvf mystuff.tgz To extract file without compression tar -xvf mystuff.tar