Thursday, August 25, 2011

[Symfony 2] Assetic with jqueryui

I've been learning to use Symfony 2 for a couple of days and quite astonished by how Symfony 2 is able to simplify most of web application development process without losing flexibility and scalability which is needed by every web programmer.

Standard package of Symfony 2 framework comes with many features from 3rd party vendor. One of them is Assetic, asset management framework for web resources, such as css stylesheet files and javascript files.

One of the problems i've encountered when learning to use Assetic was there's only few documentations and was poorly written. Maybe it was due to Symfony 2 is still in an early stage. This post will show you how to integrate Jquery-UI with Assetic.

First, we need to create a subfolder under 'Resources' folder named 'public' in our Symfony 2 bundle folder. This folder will hold all of our CSS and javascript files.

Inside the folder, we add css file from jquery-ui installation file.

From our console in top directory of symfony installation, run bellow command :

$php app/console assetic:dump

to tell assetic to generate dynamic css and javascript file.

Then run :

$php app/console assets:install --symlink web

to install the generated files from previous step.

After installed, we can use asset_url in twig as usual.

The problem occur when jquery-ui css file trying to find images in the url.

The solution is to move the whole jquery-ui images directory :


to Symfony 2 web css dir. So the directory will be like :


And your jquery-ui css will run as it supposed to be. (:

Read more!

Monday, August 1, 2011

Rooting manual android

REQUIREMENTS : - Linux *of course! 8-) - Android SDK with  - busybox binary - Superuser.apk  - psneuter exploit binary - su-v2 binary You can find all the files listed above from SuperOneClick installed directory in M$ WINDOZ.
On Linux machine :
!! Make sure adb server is running as root. !!

$./adb push psneuter /data/local/tmp
$./adb push su-v2 /data/local/tmp
$./adb push busybox /data/local/tmp
$./adb shell
On android console :
$ busybox chmod +x /data/local/tmp/psneuter
$ /data/local/tmp/psneuter /* you will get logged out from android console and just run*/
$./adb shell /* again to get android shell back as root. */
# mount  /* find entry for '/system' mount */
/dev/stl12 /system rfs ro,relatime,vfat,log_off,check=no,gid/uid/rwx,iocharset=utf8 0 0
# mount -t rfs -r -w -o remount /dev/stl12 /system /* change the command according to your device. */
# busybox mv /data/local/tmp/su-v2 /system/xbin/su 
# busybox chmod 06755 /system/xbin/su 
# busybox chown 0.2000 /system/xbin/su 
# busybox ln -s /system/xbin/su /system/bin/su  
# busybox cp /data/local/tmp/busybox /system/xbin 
# busybox chmod 0755 /system/xbin/busybox 
# busybox chown 0.2000 /system/xbin/busybox 
# exit 
$ exit
Back to Linux machine :
./adb install Superuser.apk 
There, ur droid is rooted! :D

Read more!