Today I had a great trick for you that use sony ericsson phones. I call it sony ericsson bluetooth internet where you can share your broadband PC internet directly to your phone using bluetooth connection. I've tested it and very fast when your device surfing web with broadband speed (not with 115kbps GRPS anymore.. :D) Want to know how?

First, of course you need sony ericsson phones and a working internet connection in your PC. Any phone type are welcome I think, I use my old K750i.
Then you must download this SDK in order to connect your phone to PC via bluetooth COM ports (serial port). This called SE SDK (Sony Ericsson Standard Development Kit). The file is pretty big, 117MB. Download SE SDK now or you can goto SE developer homepage to check the new version of SE SDK.

Install it to your PC, follow the procedure till finish then restart your PC.
OK, while you restart your PC please make sure that you block your phone's internet access by change the internet profile to blank profile (or delete the working internet profile if you want.. :D) So now, your phone is can't establish connection to the net. Change it also in java setting.
Turn on your phone's bluetooth.

Now open link called connection proxy in start menu - all programs - Sony ericsson - Java ME SDK for CLDC. Click connect button. Don't forget to turn on your PC's bluetooth.
If the setting correct, then your phone will connected to PC like this. If there's connection error, please check you COM ports.



So far you phone will do send and receive packet with your PC through bluetooth. Minimize connection proxy then open device explorer link in the same location with above link.. :D
Device explorer will refresh and recognize your phone model, listing installed apps in your phone.



You're ready to go. Find opera mini (I assume that you already install opera mini) then right click start MIDlet. Opera mini will automatically run in your phones. You can browse the net from it and of course, using your PC's internet connection. Cool trick right? :D
So now I can browse anything in my phone using my PC's internet connection.

Encode javascript using eval P A C K E R

Posted by Andi Syahputra | 2:16 PM
Recently I found a cool tools that will encode your javascript using eval packer function. It make your script become hard to read. To access this eval packer you can go to dean edwards webpage. Paste your script there then choose base 62 encode and click pack button.

For example this is example original javascript:
function test(){
var a = 34;
alert("test");
document.write(a);
}

Packed script will become like this:
eval(function(p,a,c,k,e,r){e=String;if(!''.replace(/^/,String)){while(c--)r[c]=k[c]||c;k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('2 0(){3 1=4;5("0");6.7(1)}',8,8,'test|a|function|var|34|alert|document|write'.split('|'),0,{}))

Nothing different in script execution, just become hard to read... :D
Just for suggestion, don't pack a large script because the script size will become larger. Just pack important small script.. :D
Then, how do I decode it if I found similar script? Ok, wait for the next post.. :D
Hope this useful

Create non blocking javascript

Posted by Andi Syahputra | 12:00 PM
I have a trick for you to manage your webpage's javascript for faster page loading. Usually, browser loading javascript sequentially that cause it must wait for javascript to load complete, one by one.
This technique will load javascript while the webpage load, is called asynchronous javascript a.k.a non-blocking javascript. Now, I'll show you how to load your javascript as asynchronous one... :D

Non blocking script technique will use javascript to load javascript. Seems confusing?
This is how we embed javascript as usual:
<script src='javascript.js'></script>

Now here is the non-blocking version. You can put it into <head> or <body> tag:
<script type='text/javascript'>
(function(){var s=document.createElement('script');s.async="async";s.type="text/javascript";s.src='javascript.js';var h=document.getElementsByTagName('script')[0];h.parentNode.insertBefore(s,h);})();
</script>

So, whether the javascript is not loading (timeout) then the webpage and other element will still loading without have to wait that script to load complete.

To compare both techniques, you can use simple javascript alert("test");
Normal version: When alert function fired, the webpage won't load complete until we click OK to close alert box
Non-blocking version: The webpage will continue loading although the alert function fired and alert box still appear.
Stereographic photo is also known as "little planet" photos. For more information about this you can visit Stereographic projection in wikipedia. Now I'll show you how to create a simple stereographic photo by using photoshop.

The best photo to create stereographic effect is a panoramic photo. Now open your photoshop and choose the image you want to make it stereographic look. For example I use this panoramic photo:



It's really wide actually
Open the file in photoshop then create a new file with square pixel. For example I use 1000x1000 pixel



Now insert that wide photo to the new file by dragging it using move tool. Stretch the panorama and fill the whole area, like this



Rotate the photo


Then open filter - distort - polar coordinates and choose rectangular to polar option.
Ok, there's our little planet.. :D


Can you see the white line in the photos? now use clone stamp tool to fix it.
Alt + Click beside the white line


Then drag the mouse through the white line.. :D



With 180 degrees of rotating, here is our little planet.



I hope this will be useful for you... :D

Embed RSS feed as javascript to the webpage

Posted by Andi Syahputra | 2:52 PM
I just found one cool tools that will convert headline from RSS feed directly to javascript version so you can embed it into your webpage. Usually you need JSON to fetch the feed then parse it as javascript. But JSON create a bunch of big file that may slow the webpage.

You can goto RSS to javascript homepage then create your own javascript. It's totally free. All you need is just paste the feed url then generate javascript after you set your own setting there. Easy to use and faster than JSON because it not create a big file like JSON does.... :D

Anyway, if you more prefer JSON than RSS to javasript, here is RSS fetch in JSON version:

<script type="text/javascript">
function recentpostslist(json) {
document.write('<ul>');
for (var i = 0; i < json.feed.entry.length; i++)
{
for (var j = 0; j < json.feed.entry[i].link.length; j++) {
if (json.feed.entry[i].link[j].rel == 'alternate') {
break;
}
}
var entryUrl = "'" + json.feed.entry[i].link[j].href + "'";//bs
var entryTitle = json.feed.entry[i].title.$t;
var item = "<li>" + "<a href="+ entryUrl + '" target="_blank">' + entryTitle + "</a>";
document.write(item);
}
document.write('</li>');
}
document.write('</ul>');
</script>

<script src="http://fun-tutorial.blogspot.com/feeds/posts/default?max-results=10&alt=json-in-script&callback=recentpostslist"></script>

Change the feed address as you want.
Very simple right? :D

How to backup browser settings

Posted by Andi Syahputra | 12:43 PM
In this time I will show you how to backup your mozilla firefox browser in case you want to re-install OS or something else that will delete your existing browser data. You don't need any backup tools to import and export your browser but you can do it manually, and it's pretty easy.
This trick will backup your WHOLE browser setting, bookmarks, cookies, even passwords saved there.

Now follow this simple steps:
- navigate to C:\Documents and Settings\USERNAME\Application Data\Mozilla then copy the folder in save it to somewhere.
- then goto C:\Documents and Settings\USERNAME\Local Settings\Application Data\Mozilla and copy the folder too, saved it in somewhere.
Please don't exchange both mozilla folders above otherwise, the restore process won't work.
Be sure your browser is closed properly to complete this process.

Congratulations, you now have a backup of your browser.

To restore it just replace the "new" existing firefox folder with the backup one.
Be sure to keep your backup safe because when others get it, they will have an access to your browser's data such as cookies, bookmarks, and saved password.

You can do this trick to other browser. The main idea is same, copy the old folder then replace the new folder with the old one.. :D

Enabling photoshop openGL drawing

Posted by Andi Syahputra | 6:33 PM
This feature available in photoshop CS4 and CS5. With openGL drawing, you can allocate the photoshop CPU usage to your GPU card so the CPU resource can be saved for other running program.
To activate it just follow this simple step.

Go to edit - preferences - performance then tick enable openGL drawing, just like below... :D


OK then restart your photoshop to apply changes.
If the option is greyed out, this means that your VGA card doesn't meet the minimum requirements for photoshop to perform openGL drawing.

Then, what's the benefit by using openGL drawing?
What I see when I enabled openGL drawing to my photoshop is a lower CPU usage when processing image. After that, it show some visual effect to image such as 3D image border, smooth zoom, and fancy effect when you use hand tool.
This changes the image processing work to look more fun and smooth.... :D