Thursday, December 23, 2010

Merry Christmas everybody!

Hi all,

Merry Christmas 2010!
Wish you a joyous Christmas, happy holiday!

Ubuntu Maverick Meerkat 10.10 on my laptop

Today I am doing a clean install of latest Ubuntu Maverick Meerkat 10.10 (the perfect ten!). This time I'm doing it from a USB drive, on Dell Inspiron 1420 (which unfortunately has always had problem for the WiFi device driver).

This time I won't get fooled around by installing the 32-bit version. This time it has to be the 64-bit kernel!
I followed the instruction given by PendriveLinux.com.

 It's quite straightforward and easy to install.

Tuesday, December 7, 2010

My wishlist for my blogger site

Now that I have my blog at Blogger/Blogspot, my wish list are:

  • a good syntax highlighter, at least similar to SyntaxHighlighter by Alex Gorbatchev; I know at certain time people managed to have it run on their blogger sites, but most of the links I found in Google is a very old links that seems to no longer working at all.
  • customize my own blog template
  • put links to my other blogs (I think this one should be very easy)

Sunday, December 5, 2010

Converting Wordpress Blog to Blogger / Blogspot

Today I am trying to consolidate my Java blog posts and separate some of my posts on Python, and also other stuffs here. All were previously in my Wordpress blog sites.
When I search in Google, there is a hope in wordpress2blogger tool. It is a hosted tool at Google App Engine. Google App Engine put the limitation of the upload to 1Mb, so you can only upload blog less than 1Mb in size. Of course we can work around the limitation by importing the blog bit by bit.
For my case, I divided into 4 chunks.

This is how I did it:

1. Login to your Wordpress account, and navigate to the Dashboard for the blog that you want to transfer to Blogger/Blogspot. I was using Wordpress 3.0 which had slightly different configuration and menu from the one described on the appengine hosted tool.
2. Click on Tools (left accordion menu section) > Export (link)
3. Download the Wordpress XML file.
4. Upload to the wordpress2blogger.appspot.com website, click [Convert] (button).
5. You will automatically download from the site, a new format that is importable by blogger. The file normally will be named blogger-export.xml
6. Open your Blogger account, create a blog if you haven't got one, or you can import to your existing blog. Go to this link: Dashboard > Settings (tab) > Basic (tab) > Import blog (link). Choose the file.

That's it! Done.

Saturday, December 4, 2010

Installing Go language on Mac OS X

I have tried the Go language from Google on Ubuntu few months ago. Now I tried it on my Mac OS X box and see whether it works on machines other than Linux box. Mac OS X is based on BSD, so I guess the difference won't be that much. Mac OS X runs on intel x86_64 architecture, and Go language supports that.
Go supposes to run well on machine with GCC, Mercurial, and Bash. Mac OS X has them all. To my surprise, I already have Mercurial on my Mac OS X box!

I created the /swdevel/golang/hgco. Then checkout from the Mercurial repository from Google Code.

I am following the instruction given here http://golang.org/doc/install.html

$ hg clone -r release https://go.googlecode.com/hg/ go
requesting all changes
adding changesets
adding manifests
adding file changes
added 6822 changesets with 26893 changes to 3944 files
updating to branch default
2435 fles updated, 0 files merged, 0 files removed, 0 files unresolved

It succeeded checking out from the Mercurial repository!

$ cd go/src/
$ ./all.bash
...
...
--- cd ../test
1 known bugs; 0 unexpected bugs

---
Installed Go for darwin/amd64 in /swdevel/golang/hgco/go.
Installed command in /swdevel/golang/hgco/go/bin.
*** You need to add /swdevel/golang/hgco/go/bin to your $PATH. ***
The compiler is 6g.

On OS X the debuggers must be installed setgrp procmod.
Read and run ./sudo.bash to install the debuggers.

Well, they warned me for a known bug!
The system doesn't seem to get the processor correctly, AFAIK my Mac Mini supposed to be Intel Core2 Duo while it detects amd64?!?

It displays a bunch of compilation messages. It took somewhere around 8 minutes on my Mac OS X box.
The 6g denotes that your architectures is x64, while 8g is for x86.

Then I need to do this:
$ echo 'export PATH=/swdevel/golang/hgco/go/bin:$PATH'>> ~/.profile

$ cat ~/.profile
Check whether you have exactly code below in the last line of your ~/.profile
export PATH=/swdevel/golang/hgco/go/bin:$PATH

Close your shell window, and open a new one (this is an important step so that your ~/.profile will be executed!).

Test on the new shell window:
$ 6g
It should displays something like this:
gc: usage: 6g [flags] file.go...
flags:
-I DIR search for packages in DIR
-d print declarations
...
...
-x print lex tokens

Done installation!
Next post will be showing the hello.go (hello world of Go language) on the Mac OS X box.