Skip to main content


Showing posts from December, 2011

DirectAdmin Upgrading CSF Firewall

(This post is meant for DirectAdmin beginners, like me.)

Finally got the chance to play with one of the production server - to upgrade the CSF Firewall.

For this, I have to SSH to the server because upgrading CSF needs root access.
Due to restrictions in "DirectAdmin you must login to the root shell" to upgrade csf using
csf -u
So I SSH-ed to the server and ran the command "csf -u". But this time, I get the following error.
-bash: csf: command not found
Okay, the path to CSF is not correct, so just need to
cd /usr/sbin/
Then gain root access,
su -
That's it, can upgrade CSF using the command "csf -u" automatically!


Convert SimpleXMLElement to Array

Ok, I know this is simple, but it took me a while to realize this simple method to convert SimpleXMLElement to an array. (I even tempted to write a function to parse and convert the XML tree).

Its simple actually, to just just the default PHP functions

$xml = <tag>content</tag>print_r(json_decode(json_encode($xml), TRUE));

Samsung Galaxy S2 variants

During trip back at Malaysia, I realize the Galaxy S2 variant there is i9100T. Which makes me wonder what are the difference.

[UPDATE, Jan 19] CyanogenMod wiki has a better list of SGS2 variants with support status comments.

After Googling around, I came to conclusion that all the variants have:

SAME hardware Specifications

and the DIFFERENCES are:
The I9100 supports 3G 900/2100Mhz and the I9100T supports 3G 850/2100Mhz The difference in SAR value, as shown in Samsung Website.
GT-I9100P - 0.362 W/kg
GT-I9100 - 0.338 W/kg
GT-I9100M - 0.338 W/kg
GT-I9100T - 0.285 W/kg
GT-I9100G - 0.247 W/kg (different processor - OMAP SoC)
Quote from Samsung Website:
This phone meets European Union (EU) requirements concerning exposure to radio waves. Your mobile phone is a radio transmitter and receiver. It is designed and manufactured so as not to exceed the limits for exposure to radio-frequency (RF) energy, as recommended by the EU Council. These limits are part of comprehensive guidelines and establis…

Notes from BlackBerry DevCon Asia 2011 #BBDevCon

Event: BlackBerry DevCon Asia 2011
Date: 2011-12-08

Updates: The speakers mentioned that the slides are available online. But I'm still not able to find 'em anywhere.

DEV846 – Advanced Web Rendering: webGL, Canvas and Gaming


Charles Wei, Technical Director, Torch Mobile (Beijing) Co. Ltd.
Robin Cao [robin.cao[at]], Senior Software Engineer, Torch Mobile (Beijing)

Tips and Tricks
- Avoid creating non-power of two images
- Avoid reading back from canvas

GLSL Shader
- WebGL - Matrices to represent states

Three.js, PhiloGL,
Khronos wiki,

DEV825 – Powering Immediacy: Putting Push Data to Work for You

Pratik Sapra, Application Development Consultant, Research In Motion
BlackBerry Push - push thru BB internet service - 8kb data - dedicated port - push service plus/ push service essential - mode : - point to point, - multicast, - broadcast. push request - PAP standard
Server Side Application Standalone approac…