My next project is installing Geoserver on my Mac OS X (Leopard). First thing I have to do is to install Tomcat on Leopard. There are heaps of instructions on the net but it’s quite complicate. I though Leopard already came with Apache built in, thus should be easy to just add Tomcat on to it. I guess, I was wrong. Tomcat set up is more complicate than I thought. It requires lots of Terminal commands and environment setup.
Nevertheless, I’m lucky enough to find the easiest way to install Tomcat just one click from NetBeans. I download the OSX NetBeans pack which already have Apache Tomcat 6.0.16 bundle with it. This is the easiest way to install Apache Tomcat on your Mac, trust me. After Tomcat installed, I can check if server is running, by go to http://localhost:8084
Next and last step is Geoserver installation. I did followed the instruction on Geoserver website and it works just fine. Here is what I did
1. Download the GeoServer-x.x.x-bin.zip version from the download page on the GeoServer home page
2. unzip to the directory of your choice
3. Open up a terminal and go to the unzipped ‘geoserver’ directory on the command line.
4. Configure your Java environment, on recent versions of Mac OS X this is done by typing
export JAVA_HOME=/Library/Java/Home
5. run bin/startup.sh
6. Go to http://localhost:8080/geoserver to configure your server
Now you can enjoy simple Mapserver on my Mac. It took me two days to find the way to do it but 15 minutes for installation both of applications.
Cheers
Tags: gis, Leopard, web 2.0
I was a huge fan of Quicksilver for years, however lately it does not launch some applications as I expect. Sometimes it just lists the webpages when I want to open an application.

Spotlight Launcher
Now I’m back to basic and it works so great. Minimal is better, I guess. Spotlight seems to improve after generations. In Leopard, I can launch any application as fast as Quicksilver using Spotlight.

Spotlight Preferenc
- Firstly, make sure that ‘Applications’ is selected in Spotlight system preference
- Then set up the shortcut that you usually used (in my case, I replaced it with my old shortcut for Quicksilver)
- Now when I want to launch anything, I just type the first two letters of that application.
- I think using Spotlight instead of third party launcher, make my Mac cleaner and reduce the Finder crashing.
I’m a huge fan of Gmail, which can do everything: Checking your other POP mail, forwarding mail etc. The only one functinality that would be killed is “PUSHING”. I think we gonna see it soon, because Yahoo already did it.
I tried to get Gmail to push to my iPhone, with a couple methods (web2mail Exchange server, YahooPush). After hours of experiment, the best method is forwarding Gmail to mobileMe and let Mobile me do the rest.
I have 3 seperate Email accounts so far (2 for my work and one for Google Apps), so I use Gmail to grab all the email into one single email and then use Gmail filter to labeling it. This lables will shows up in Mail App and iPhone Mail IMAP folder as well.
-
-
-
Lable in Gmail
-
-
Different reply from Mail App
Then I just forward Gmail into my MobileMe account. This instruction is a good start. The trick is I have to set up SMTP for Gmail on iPhone in order to reply back the message via Gmail account.
For serveral other email accounts forwarding to Gmail like me, I have to set up fake POP mail so that I can use it to reply back via relevant email address.
Tags: google, iphone, mail
I heard about Google supporting CalDAV a couple days ago but I just tried it out today. It’s so cool, just like I’m using IMAP calendar (not pushing though).
Everything you want to know about Google CalDAV and how to set up with iCal can be found at Google Support.
OK, here is how I make it to perfectly synchronize with iCal
- First you need to set up you calendar in Google Calendar

- I have setup the label for each calendar on my iCal
- Check the Calendar of each calendar by going to “Calendar Setting”

Calendar ID
- Now go to iCal preperence

iCal setting
- Now click on “+” sign to add new calendar
- Put username (your gmail address), password
- On account URL put “https://www.google.com/calendar/dav/YOUR_CALENDAR_ID/user”
- Replace “YOUR_CALENDAR_ID” with your Calendar ID from Google Calendar
Done, now you can enjoy the new functionality of syncronizing iCal and Google Calendar. When I add new event in iCal, it will appear on Google Calendar instantenously, so it’s really like “PUSHING”. However, it you create new event on Google Calendar, you need to refresh iCal to see the updated event. Nevertheless, you can set the refreshing time to be in the interval of 1 minute which is almost “PUSHING” also.
I think now my mobileMe calendar and Google Calendar are syncronizing in the same rate. Be careful, mibileMe, if Gmail come put with Push … nobody gonna pay more than $100 a year anymore.
Tags: google, ical
I write this post from wordpress mobile on my iPhone. It’s so cool but small keyboard is quite difficult to write, better than nothing though.

Tags: iphone

Send HTML Email
Today I found a question in Thai forum about how to compose HTML email with Mail in Leopard. I think this should be easy, right? However, it quite tricky than I though. I assume that Mail 3.4 should provide some functionality to help composing HTML email. In fact, Apple wants to make composing email easy for beginners but quite inadequate for advance users. Here is what I did.

HTML file on Safari
- Create HTML file and save it on your computer
- Open that HTML with Safari
- On Safari use File > Mail Content of this page
Tags: html, Leopard, mail
After I build my AppleTV hard drive from Scratch, I did some hacking so my AppleTV now can play any file formats and use external USB hard drive to store media (500GB). The big problem occurred when I rented “I am a legen HD” from iTunes and tried to play on my AppleTV (connected to Acer LCD). There is an error said
“This content requires HDCP for playback.
HDCP isn’t supported by your HDMI connection.
Use the component video connection to watch this content.”
So I desperately cannot watch my rented movie unless I change my expensive HDMI to cheap Component cable. I don’t want to mess up with my cables which are quite difficult to reach, so I did a little google and found out that they are many similar cases over the net. I tried many thing but finally this is the step that works for me.
We need to update HDMI controller in AppleTV. Here are the steps.

- Go to http://mesu.apple.com/version.xml with Firefox (does not work on my Safari)
- Use Firefox to download 2 files (These file might change upon AppleTV firmware version)
hdmiutil
FW29050_20080205_dse_hex.sihex
- Copy those two files to AppleTV
- Use Terminal to run this command
$ chmod +x hdmiutil
$ chmod +x FW29050_20080205_dse_hex.sihex
$ ./hdmiutil FW29050_20080205_dse_hex.sihex
- Terminal should respond with this message
hdmiutil - HDMI Flash Utility Version 1.1000 (Mac)
For Programming Silicon Image's SiI1930 (DVI-HDMI) microcontroller.
Copyright (C) 2006-2008, NVIDIA Corporation. All Rights Reserved.
Using default I2C configuration on Mac platform.
Temporarily disabling hotplug interrupt processing...
Firmware Filename: FW29050_20080205_dse_hex.sihex
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! Do not interrupt power or hotplug displays during flashing process. !!!
!!! This might take a while to complete (approx 5 min for each file) !!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Sector Erase 0%........10%.......20%........30%.......40%........
50%.......60%........70%.......80%........90%......100%
Programming 0%..........10%..........20%..........30%..........
40%..........50%..........60%..... (goes till 100%)
OK - file FW29050_20080205_dse_hex.sihex firmware flashed successfully!
Re-enabling hotplug interrupt processing...
- After unplug and re-plug, your AppleTV should be able to play rented HD movie.
Enjoy ^_^
Tags: apple tv, hdmi
Ok, I am stupid enough to upgrade my iPhone firmware from 1.4 to 2.0 via iTunes. So it took me 2 full days to figure out how to bring my iPhone back to life. Here is how I did.
You absolutely need iTunes 7.5 to restore your firmware 1.4 . I don’t want to mess up with my iTunes on my Mac (of course, because of all my precious music) so I just D/L iTunes 7.5 Windows version and run on Parallel Desktop.
- On Windows, when you connect your iPhone to iTunes 7.5, it will tell you to restore it. (If you first connect your iPhone with firmware 2.0 to Windows, it might say that your phone is not compatible with this version of iTunes. Dont’ worry about this message, just close the popup)
- Press Shift + Restore (Option+Restore on Mac) and select 1.4 firmware.
- When finish, you should get 1015 error (if you don’t try again). Don’t worry about the error. Close your iTunes, the iPhone will stuck in recovery mode.
- Use iBrickr to kick it out of recovery state.
- I have to restore 2 times in order to kick it out of recovery mode.
- This is the most important!!! YOU HAVE TO DOWNGRADE BASE BAND FROM 04.05.04_G to 04.04.05_G
- I used ZiPhone patch newest version to downgrade baseband (I tried many methods on the internet, none of them work for me)
- Once you downgrade baseband you should get signal even though you did not do any jailbreak,activate or unlock.
- Now you can use any method you want to unlock the phone. I used ZiPhone on mac to do everything.
Now I have to keep my iTunes 7.5 on Windows parallel just incase I mess up anything again because now we know that 7.7 have some kind of hacking protection.
UPDATE : iClarified has a very nice tutorial plus video instraction to downgrade the baseband now.
UPDATE2: The Dev-Team released PawnageTool 2.1 which can easily Jailbreak/Activate/Unlock 2.0 firmware. The nice tutorial can be found at iClarified
Tags: iphone
For someone who accidentally formatted or bricked TV hard drive (like I did), here are steps that work for me on Leopard (10.5.4)
- Either you got new hard drive or bricked hard drive, you got to connect hard drive to you mac
- Use diskutil list to see your disk partition (we need to know where an TV hard drive is)
- Here is what proper partitions should look like when you finish (please note /dev/disk1 as you TV hard drive)
- Then delete and re-create partition table using command below in Terminal
gpt destroy /dev/disk1
gpt create /dev/disk1

- Now we need to partition harddrive, first create EFI partition
gpt add -b 40 -i 1 -s 409600 -t efi /dev/disk1
- Then create Apple_Recovery partition
gpt add -b 409640 -i 2 -s 819200 -t 5265636F-7665-11AA-AA11-00306543ECAC /dev/disk1
- Next is OSBoot which is where the OSX fit in
gpt add -b 819240 -i 3 -s 1843200 -t hfs /dev/disk1
- The last partition is Media which is all the movies and songs are located. This partition you need to fill in the *size* part your self by looking at the end size using command
diskutil unmountDisk /dev/disk1sudo gpt show /dev/disk1
gpt add -b 1843240 -i 4 -s *size* -t hfs /dev/disk1
- After partitioning, we need to format OSBoot and Media partition in HFS+ Format
diskutil eraseVolume "Journaled HFS+" OSBoot /dev/disk1s3
diskutil eraseVolume "Journaled HFS+" Media /dev/disk1s4
diskutil unmountDisk /dev/disk1
- Now you ready to restore OSBoot partition to working state. Download the latest AppleTV Take 2 software by checking link here http://mesu.apple.com/version.xml
- Then you can use Disk Utility to easily restore OSBoot partition
- Set the source to the newly AppleTV image that you just downloaded (2Z694-5428-3.dmg), and drag the OSBoot partition to Destination. After that press “Restore” button.

- This process took about 3 minutes, after this step you’re done.
- Connect TV hard drive back to TV
- Once you startup the TV, it will create EFI image in TV automatically
- I did the Factory restore to make sure that everything is working fine.
- Now your TV is ready to use (and to be hacked ^_^)
Thanks for http://wiki.awkwardtv.org/wiki/Prepare_a_Hard_Drive and http://smallnum.blogspot.com/2008/02/re-creating-apple-tv-from-scratch.html for a very useful information.
Tags: apple tv, Leopard, movie
I think there are many people accidentally delete or format theirTV hard drive (like I did). Obviously we need to buy a new hard drive or restore damaged hard drive to the functional state. There are many thread regarding this subject on over internet, but I think my method is simplest and easiest. Here is what I did.
1. Get the latest TV image from link below
AppleTV take 2.0.2 firmware
2. Connect your hard drive to your Mac.
3. Open the Disk Utility application. You should see new firmware that you just downloaded and TV and see your new connected hard drive.
4. Click on your new hard drive and go to restore tab.
5. Drag firmware to the ’source’ field and new hard drive to the ‘destination’ field, as in picture below.

6. Click on restore and you’re done.
PS. This method is working on my machine which I spent less than 10 minutes for the whole process. However, there is no ‘recovery’ partition created on this method (which is not important since everything on my AppleTV take 2.0.2 is working fine)
Tags: apple tv, Leopard