Posts

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...

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. Topic: DEV846 – Advanced Web Rendering: webGL, Canvas and Gaming Speakers: Charles Wei, Technical Director, Torch Mobile (Beijing) Co. Ltd. Robin Cao [robin.cao[at]torchmobile.com.sg], 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 Libraries Three.js, PhiloGL, Khronos wiki, learningWebGL.com Topic: DEV825 – Powering Immediacy: Putting Push Data to Work for You Speaker: 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, ...

Fat-Free Framework - Blank Page Error

Was trying getting started with Fat-Free just now, but found that the page wasn't loading at all, or more accurately, a blank page was shown. I added a dummy echo before the template echo, echo "Hello World!"; echo Template::serve('welcome.htm'); and found that the echo is printed, but not everything else in the welcome.htm After debugging, I found out that its caused by {{ Web::minify('ui/',array('style.css'),FALSE) }} The page displays correctly, without css style, after removing that line, and clear the cache . To solve this, its relatively easy. Just need to enable php_sockets in you PHP extension . Then clear the  /cache folder . Hope that save the your time for some of you out there as well! :)

[i9000] Flashing CyanogenMod for Beginners

Image
UPDATE (2011-11-27) : After flashed to CyanogenMod and tested for a few days, I think that CyanogenMod is GREAT, i9000 users should just flash to it since Samsung firmware support for i9000 isn't that great, and slow. :) The guide can be found from  wiki.cyanogenmod.com . But its not complete with all the downloadables, there are few missing steps. 1. Installing the ClockworkMod Recovery Prerequisites: Before you begin, follow Step 1 & Step 2 from  CyanogenMod  to get the drivers installed. Downloadables & Installation Guide Heimdall Firmware Packages -  http://forum.xda-developers.com/showthread.php?t=1196179 (As of now, XXJVT is the latest version) 2. Root your Phone There are few options to root your phone. Gingerbreak  by ChainFire. CF-Root by ChainFire (works for XXJVT) I used CF-Root and it worked. Just a small note, if Odin cannot detect the phone, you can always reinstall the driver by running Kies devic...

DirectAdmin Cron

If your hosting provider blocked you from running PHP files from command line (for security reason). cd /home/ <user> /domains/ <domain.com> /cron_scripts/; /usr/local/bin/php script.php Then the alternative would be using lynx, and access the files via url :) lynx -dump http://www. <domain> .com/path/script.php > /dev/null 2>&1