Happy (belated) 2010!

Alright, I know I’m 1 month behind. >.< I had left my website/photos/blog for quite a while. (this is definitely more than a month >.<!!!!. But hey, I’m making effort to revive it! First off, updated the theme on my blog – the look and feel should now be more consistent on my website and also on my photo (licious) gallery. Brought my huge backlog of pictures up-to-date (almost all of them!), the latest being Randy and Rachel’s wedding! :D

Speaking of weddings, I was just browsing some cinematic wedding films the last few days and looks like there isn’t any good ones in the US. Seriously, there’s a bunch of crappy ones if you just google “cinematic wedding film”. But take a look at these 2 videos:

I think a crew of 2-3 people can kick-start this. If there’s someone who wants to start experimenting this, I’m all onboard!

If you want to see more videos, take a look at these sites:
Paper Cranes (Burung burung kertas)
Mayad Studios

Oh, and one more thing – it feels good to have FINALLY graduated!

Installing Snippy on CentOS 5

I wanted to install something like Pastie at my workplace to easily share snippets of code privately, instead of sharing it to the whole wide world. There are some open source alternatives such as LodgeIt and pastebin but for some unknown reasons, I could never get it to set up properly.

Then I came across snippy (a clone/ripoff of Pastie as the author – Flinn Mueller puts it). Mueller provided some documentation on how to set up, but it wasn’t sufficient to set it up in CentOS. In addition, I had ZERO knowledge about running Ruby on Rails applications which might be another contributing factor to why I had so many issues setting it up. Here’s a guide on how I managed to set it up successfully on CentOS:

Getting everything that Snippy needs:

Install Ruby on Rails

Snippy runs on Ruby on Rails. If you do not have this installed, Slicehost has a great guide on how to install it.

Additional notes:

  1. The current release of rubygems is v1.3.5. Please grab the latest version when following Slicehost’s article.
  2. Snippy somehow would fail to install with the latest version of rails (v2.3.3). The following error will appear if you tried to install snippy:
    undefined method `make_cache_key' for class `MemCache'

    To solve this, in addition to all the steps you followed at Slicehost, do

    gem install -v=2.1.1 rails
    

Install Sphinx

wget http://sphinxsearch.com/downloads/sphinx-0.9.8.1.tar.gz
tar xvfz sphinx-0.9.8.1.tar.gz
cd sphinx-0.9.8.1
./configure
make

(If you receive an error about command not found for g++), do:

yum install gcc-c++

Finally,

make install

Install Oniguruma

To have it working for snippy, I needed to install Oniguruma from 2 different sources. Why? I do not know since installing just either one of them would not get Snippy running. First, I obtain and installed the rpm for CentOS:

	wget ftp://ftp.pbone.net/mirror/centos.karan.org/el5/extras/testing/i386/RPMS/oniguruma-5.9.1-2.el5.kb.i386.rpm
	rpm -i oniguruma-5.9.1-2.el5.kb.i386.rpm

Next, I obtained the latest release from the Author’s site (http://www.geocities.jp/kosako3/oniguruma/)

wget http://www.geocities.jp/kosako3/oniguruma/archive/onig-5.9.1.tar.gz
tar xvfz onig-5.9.1.tar.gz
cd onig-5.9.1
./configure
make
make install

The fun part – Snippy!!!

Most of the following steps follows what Mueller had outlined in his README.

git clone git://github.com/actsasflinn/snippy.git
cd snippy
cp config/database.yml.example config/database.yml
vi config/database.yml

Edit the config/database.yml to match your own db settings. You must include an additional parameter called “host” to get Snippy to work. E.g. For mine, I set the following for development, test and production:

adapter: mysql
encoding: utf8
database: snippy_development
username: myUser
password: myPassword
socket: /tmp/mysql.sock
host: 127.0.0.1

Next,

rake gems:install
rake db:create

You might get the an error “error with missing these required gems: oniguruma and textpow” after doing “rake db:create“. If so, do the following:

gem install -r textpow --include-dependencies

Then,

rake db:migrate
rake bootstrap
rake thinking_sphinx:configure
rake thinking_sphinx:index
rake thinking_sphinx:start
ruby script/plugin install git://github.com/rsl/acts_as_snook.git --force
./script/server

If all goes well, you should be able to launch your browser and go to http://YOUR_SERVER:3000 to see if you can start snipping. :D Big thanks to Meuller for this wonderful application!

Silverlight 3 and Hackintosh

Microsoft recently released Silverlight 3. As most of you know, the silverlight installer checks if you’re using an Intel Mac before it allows you to continue the installation. If you did not configure well / did a vanilla install, the installer will halt and informs you that you are using a PPC machine even though your hackintosh is running on Intel. I repackaged the installer to ignore the system check.

Here’s the link.