Wednesday, February 27, 2013

Did you know malaysia have 15 states and federal territory?

Putrajaya is a federal territory of malaysia

Monday, February 25, 2013

Modsecurity 2 disabling per domain

sample of disabling mod security 2 for a single domain:
SecRule SERVER_NAME "^.*domain\.com$" phase:1,nolog,allow,id:[#id here],ctl:ruleEngine=Off

SecRule SERVER_NAME "^.*domain\.com$" phase:1,nolog,allow,id:12312388,ctl:ruleEngine=Off

Wednesday, February 20, 2013

jQuery mobile blank page on navigate on android

This situation happen when the app requires an inner ajax page loading without refresh the page.

It seems that when one of the inner div is long (especially with listview), any navigation to a short page might trigger a blank page issue.

We aren't sure if this is android browser issue, or jquery mobile issue.
The solution is to scroll to the top before showing the new page (especially short page).

To scroll to the top:;

jQuery("#content > div").hide();
jQuery("#content #mypage").show();

Sunday, February 3, 2013

jstree 1.0 new concept

replace json_data with json

new data array uses li_attr and a_attr

Sample json: