VPS @ DigitalOcean + CentOS 6.6 + VestaCP + Other

Recently I was having problem running Laravel 5.0 framework on a shared hosting from my hosting provider due to missing one or more PHP dependencies / modules required by laravel 5.  In order to solve this, I planned to install my own Virtual Private Server and installed the missing PHP modules my own ( having full control to the server, except the internet connection, the processor, the ram and the bandwidth transfer… other than that, it is a must.).  Now, the laravel 5 is working perfectly on the new VPS hosting.

I think people should use VPS if they have more than 10 sites to host rather than wasting your money renewing more than 10 sites every year. I do have more than 10 sites (including from my clients). That is why it is better to get my own VPS.

If I have time, I will write a step by step on how you can setup a VPS hosting at DigitalOcean + Hosting Control Panel (VestaCP).

The server up time will be 10% because I use the command ‘reboot’ a lot at the terminal.  So, tell me if you need to host at my VPS.

– MaXi32,

MySQL to GeoJson parser


I’m working on a project that requires to convert mysql to geojson in order to use that json data straight to mapbox and display the result. Here is the code where we can convert MySQL query result to Geojson. (Credit to wboykinm @GitHub):
header(‘Content-type: text/plain’);
$username = “[user]”;
$password = “[password]”;
$hostname = “localhost”;
$database = “[database]”;
// Opens a connection to a mySQL server
$connection=mysql_connect ($hostname, $username, $password);
if (!$connection) {
die(‘Not connected : ‘ . mysql_error());
// Set the active mySQL database
$db_selected = mysql_select_db($database, $connection);
if (!$db_selected) {
die (‘Can\’t use db : ‘ . mysql_error());
// json output – insert table name below after “FROM”
$query = ‘SELECT * FROM survey';
$dbquery = mysql_query($query);
if(! $dbquery )
die(‘Could not get data: ‘ . mysql_error());
// Parse the dbquery into geojson
// ================================================
// ================================================
// Return markers as GeoJSON
$geojson = array(
‘type’ => ‘FeatureCollection’,
‘features’ => $feature
while($row = mysql_fetch_assoc($dbquery)) {
$feature = array(
‘type’ => ‘Feature’,
‘geometry’ => array(
‘type’ => ‘Point’,
‘coordinates’ => array((float)$row[‘lon’], (float)$row[‘lat’])
‘properties’ => array(
‘name’ => $row[‘title’]
//Other fields here, end without a comma
array_push($geojson, $feature);
// // Return routing result
echo json_encode($geojson);

Credit to wboykinm @GitHub

How to install Cordova on Windows for Windows Phone with Plugins

Hi mobile developers, in this post I would like to explain step by step how to install Cordova. Cordova, is a framework which you can use to develop mobile application. The official documentation on how to install the framework on Windows Development as for today, is worst.

Step 1:

Download nodejs from http://nodejs.org/download and make sure that you have the following path in your Environment Variables as shown below:



Step 2: Install the latest Cordova version using CLI (Command Line Interface). Type the following at command prompt to install cordova from the server repository:

C:> npm install -g cordova

3) Create an empty folder, then open command prompt and navigate to the folder using ‘cd’ command.

For example if you have created a folder called ‘MyProject’ at ‘C:\MyProject’. Then you can type the following at the command prompt:

cd  C:\MyProject

Then next, type the following command to create the project template

C:\MyProject>cordova create hello com.example.hello HelloWorld

Navigate to the directory ‘hello’ by typing the following at command prompt:

C:\MyProject>cd hello

4) Define the OS you want to support. For windows phone 8:

C:>MyProject>hello>cordova platform add wp8

5) Install plugins (If needed). For example we want the following plugins to be installed for development:

cordova plugin add org.apache.cordova.device
cordova plugin add org.apache.cordova.camera
cordova plugin add org.apache.cordova.media-capture
cordova plugin add org.apache.cordova.media

Note: list of other plugins can be obtained from here: https://build.phonegap.com/plugins

6) Finally, generate our Windows Phone 8 cordova template by using this command:

C:>cordova build wp8

From step 6, if you got an error, Make sure to put the following path


in the User Environment OR System Environment as shown below.


Step 7 )  After you have built the wp8 template, you can straight away open it (HelloWorld.sln) up as shown here:


8) Then, finally you can export your own template from the visual studio 2013 by using the template export from the File Menu. Whenever you want to build your application using Cordova next time, you don’t have to follow all this steps again.

Step null) Lazy to follow this tutorial? Grab the working template here: CordovaWP.zip

and copy the zip file (no need to extract) to

C:\Users\[Your Username]\Documents\Visual Studio 2013\My Exported Templates\

 After that you can create a new cordova project from Visual Studio template.


… not actually the first post.

Hai, selamat datang. Jemput masuk. Jangan segan2.. Dah lama la jugak tak tulis belog. Kalau dulu (established since 2009), blog ni penuh dengan tutorial programming, dan jugak ideologi physicolismistism yang menjadi pencetus kepada pembangunan ummah. Apa2 je.. Tapi, untuk permulaan yang fresh, pertama sekali, saya nak ucapkan terima kasih kat Zenpipe.com sebab sponser free hosting ni. Zenpipe.com . Pada kali ini, saya akan cuba menulis sebanyak mana ilmu yang dapat dikongsikan. Actually, banyak benefits tulis belog ni. Sebab tu nak teruskan balik setelah sekian lama kesepian :).