Saturday, November 29, 2014

Watermark with Javascript

Event they are many plugin watermarkjs ready to use. I still finding the simplest way to achive this simple thing. JS Bin

Friday, November 28, 2014

Input filter to interger only

jquery keydown not work on mobile jquery preventDefault cannot be used then Here is the example of how to block event propagation and block non integer input. Gist jsfiddle Edit fiddle - JSFiddle

Monday, November 17, 2014

Easiest Way to install Polymer

I already tried bower.

If you prefer bower to install polymer for your mobile development, you can proceed this reference:
Here i prefer accomplish this using bash.

You need setup your public key for your github account.

I don't know why am i suggests you to choose the bash instead of the bower. What i know here is bower is JS base. May be the JS easy to crash.

Thats all from me.

Wednesday, October 29, 2014

Export Update base on Commits

Hai, day to day i keep searching about it. This solution i found is not best as what we or i need but i better than nothing.

What the code above doing is compile files from latest commit to your selected commit into a zip.

Grab the cobe from Github

Thursday, September 25, 2014

Wednesday, July 2, 2014

Wordpress Highlights #1

1# Wordpress To Dropbox

Dunia 'cloud' kini berkhidmat untuk kita backup laman sesawang kita secara atas talian selain dari pada menyimpannya dalam simpanan fizikal.

2# Ghost Integration for Wordpress

Pengguna umum tidak sepatutnya dipaksa mempelajari perkara baru dan perkara asing iaitu menulis aturcara walaupon hanya HTML dalam melaksakan kerja menulis artikel. Maka 'ghost' boleh diambil sebagai alternatif mudah untuk meraka.

3# Wordpress 3.5 Post Format UI updates

Perkembangan antara muka Wordpress ini hampir sama ideanya dengan Google+ dan Facebook di waktu pengguna 'post artikel'. 4 jenis artikel kebiasaannya dikongsi di laman sosial adalah seperti 'event', 'link', 'video', dan 'photo'. Perkembangan antaramuka yang Wordpress 3.5 sediakan adalah mengikut perkembangan semasa.

Friday, May 16, 2014

Use Static instead of the Globals

Oh no. php global are now deprecated in PHP!
how to refactory my code?

So, after about half day. I found the way.

Why globals or static? 

# I need something like 'reuse' not 'requery';
# I dont want query user profile in every function i need the data.

function get_current_username()
//do query user profile for the username

function get_current_picture()
//do query user profile for the picture

# I dont want mess my function with the same argument

function get_current_username($current_user)

function get_current_picture($current_user)

So with the php globals, we can skip requery like this

global $current_user;

$current_user = get_currentUser();

function get_current_username($current_user)
global $current_user;
return $current_user['username'];

function get_current_picture($current_user)
global $current_user;
return $current_user['picture'];

but for me to implement the php static, i need to refactor my codes.

Using the static in classes can be called as 'singleton'.
But you guys can read more about singleton

See Simple Basic Singleton here

Saturday, March 15, 2014

Cyanfox KITKAT installed in m7 device

My first try fail with error messages something like this:

I found people talk about update recovery image.  So, i go download the latest recovery image from

and continue reflash the cyanfox rom.

Everything work!

Saturday, February 22, 2014

Mobile-first web development trick to save money

Here i share the trick to save money using virtual device instead of the real devices. We can use 1 extended screen to run all emulator or simulator we need.

For Android:
1. Instal HAXM
2. Open Android > Create AVD

For iOS:
1. create simulator shortcut:

That all!
I glad meet this way. I don't need to buy all sort of devices. :)

Wednesday, January 15, 2014

Full Page Screenshot using command line

Chrome extension page screenshot by google not work for me already. So i used another one instead.

Chrome Extension Full Page Screenshot

I also found Ubuntu and Mac can do it via command line;

How to install

//for mac
$ brew install webkit2png

//for ubuntu
$ sudo apt-get install wkhtmltopdf

Note: please share you you guys found for the Window one. Thanks.

  • Get brew for your mac here