Opening MacOS X Finder Window on A Hidden Folder from Terminal

Most Unix/Linux based operating system such as Ubuntu or Mac OS X has their own method to hide a specific file or folder from a File Manager application. A file or folder with a dot character (.) at the beginning on its name normally will not be shown by a simple ls command or File Manager application except configured to do so. On a Mac OS X Finder application, files Continue reading Opening MacOS X Finder Window on A Hidden Folder from Terminal

Troubleshoot: PHP `No Input File Specified` Error

Are you using pretty URL on your web application or website? Having problem with “No input file specified error” from PHP? Confused why my PHP code is not working? The PHP code is working flawlessly on localhost but why is not  working now? Which php file is causing this error? Is it web server or PHP related problem? If some of questions answer is yes and when you are using Continue reading Troubleshoot: PHP `No Input File Specified` Error

Configure Timezone Settings on Raspberry Pi Raspbian Wheezy

Below is an example on how to configure date and timezone settings on your Raspberry Pi Raspbian Wheezy. The following example is based on Debian Linux and it is working perfectly with Raspbian Wheezy for Raspberry Pi. pi@raspi: ~ $ sudo -i password: root@raspi:~# tzselect Please identify a location so that time zone rules can be set correctly. Please select a continent or ocean. 1) Africa 2) Americas 3) Antarctica Continue reading Configure Timezone Settings on Raspberry Pi Raspbian Wheezy

Connecting Raspberry Pi to WiFi

Raspberry Pi doesn’t come with WiFi adapter built-in. It only have one fast ethernet (RJ45) port to connect it to the network. In order to make your Raspberry Pi become wireless, there are many small-sized WiFi USB dongle which is work out of the box with Raspberry Pi. One of them is TP-LINK TL-WN823N WiFi USB dongle. Plug in the dongle to the Raspberry Pi USB port, then it should Continue reading Connecting Raspberry Pi to WiFi

How to fix warning: setlocale: LC_CTYPE: cannot change locale (UTF-8)

When you do an SSH to a certain server and execute some command in terminal, you may notice a warning that said “warning: setlocale: LC_CTYPE: cannot change locale (UTF-8)”. This caused a few problems when running some perl or installation scripts that would complain about the locale variables not being set. This warning occurs when I am trying to do a remote command to my Ubuntu server through an SSH from Continue reading How to fix warning: setlocale: LC_CTYPE: cannot change locale (UTF-8)

Backup Your MySQL Database Contents to SQL File Using PHP

Here’s a snippet to backup MySQL database content to SQL file using PHP code. This code is very useful when you want to make a daily or hourly snapshot of your currently running database. Or maybe you want to add a backup feature on your blog CMS. backup_tables(‘localhost’,’username’,’password’,’blog’); /* backup the db OR just a table */ function backup_tables($host,$user,$pass,$name,$tables = ‘*’) { $link = mysql_connect($host,$user,$pass); mysql_select_db($name,$link); //get all of the Continue reading Backup Your MySQL Database Contents to SQL File Using PHP

Android: Passing ArrayList of Object Within an Intent

An intent is an object that is very useful to pass variables between activities in Android. Basic primitive data types such as Integer, String, Boolean are easy to be passed through an intent. On my previously written article on how to switch between android activities I already explained on how to pass a char sequence variable. But Android has no custom object data type that can be passed directly through an Continue reading Android: Passing ArrayList of Object Within an Intent

Tutorial: Android SQLite Database

SQLite is one of several ways that Android provide to store data. SQLite is already come with vanilla Android OS and it is very light weight to be used under mobile environment. Below is the tutorial on how to create classes to handle SQLite database operations. For the sake of simplicity, I only uses one table with only 3 columns to store cars information. The three columns are id (INT), Continue reading Tutorial: Android SQLite Database