vibol hou

Installing node.js on CentOS 6.3

Node.js does not come with RPMs for CentOS. Chris Abernethy provides instructions on how to do this but node.js has gained two major versions since then and files in the original source package have been removed. Here are the updated instructions without building the source as root.

  1. Make sure you have the Development Tools group installed
    sudo yum groupinstall 'Development Tools'
  2. Install supporting development libraries
    sudo yum install openssl-devel
  3. Download node.js 0.6.15 into your ~/rpmbuild/SOURCES folder
    mkdir ~/rpmbuild/SOURCES
    cd ~/rpmbuild/SOURCES
  4.  Download the latest specfile into you ~/rpmbuild/SPECS folder
    mkdir ~/rpmbuild/SPECS
    cd ~/rpmbuild/SPECS

Feel free to  fork/update the specfile as versions change on GitHub:

Here are the RPMs built from these instructions for the x86_64 architecture. Sorry, it’s unsigned.

ZenfolioRSS for WordPress v1.0 Released

It’s been almost exactly two years since the last update, but here it is.

v1.0 Release Notes:

Head on over to the ZenfolioRSS for WordPress page to download the source files.

Colorize and ignore whitespaces when using SVN diff

To diff and ignore whitespace, create a script called ‘sd’ with the following content:

svn diff --diff-cmd diff -x -uw $1 | view -

Run it like so:

sd -r13788:head

Uninstalling MacPorts

Having upgraded to Snow Leopard, I wanted to wipe out my MacPorts installation and start clean. I’ve had tons of stuff installed and updated from the past (three versions of each port, in fact). Here’s how to uninstall MacPorts.

The first step is to uninstall all the installed ports:

sudo port -f uninstall installed

Then remove any trace files lingering about:

sudo rm -rf /opt/local \
/Applications/MacPorts \
/Applications/DarwinPorts \
/Library/Tcl/macports1.0 \
/Library/Tcl/darwinports1.0 \
/Library/LaunchDaemons/org.macports.* \
/Library/StartupItems/DarwinPortsStartup \
/Library/Receipts/MacPorts*.pkg \
/Library/Receipts/DarwinPorts*.pkg \

Three steps to uninstalling MySQL on Mac OS X

Here are three simple steps to uninstall the MySQL installation provided by You should take care with these commands since a typo can obliterate portions of your OS, requiring a reinstall. If you’re comfortable with shell commands and understand what’s being done, here are the commands:

sudo rm -rf "/usr/local/mysql*"
sudo rm -rf "/Library/StartupItems/MySQLCOM/"
Go to System Preferences... > ctrl-click the MySQL icon and remove it.

How to find total file size in Linux

DOS sums up the sizes of all the files it lists when using the dir command, but Linux ls does not. Here’s an awk script that will calculate that information.

ls -la [filenames] | awk '{ sum += $4 } END { print sum }'

An easier command (thanks Sunny):

du -hs * --total

The Founder Visa vs. The Job Seeking Entrepreneur

I think Paul Graham’s essay on The Founder Visa is a great one in principal. I think there are tremendous benefits in having foreigners come to the US to start businesses. It never hurt innovation to have many startups vying for market space. On the other hand, there is another source of people that are hugely capable of starting businesses… the millions of laid off workers in our very own country.

The system has a financial assistance package for these people–it’s called unemployment insurance. Unfortunately the system has promoted a culture of paying people to look for jobs rather than create jobs. A case in point is that I, in California, am not eligible for unemployment insurance because I am starting a business that has already employed several people rather than looking for work “full time.”

When my previous company hit the wall and laid everyone off, I had two choices: 1) look for a new job, or 2) start my own company. For a variety of reasons (mostly good ones), I decided that it was time for me to do the latter. I searched around for resources and stumbled upon a program by the US Department of Labor that suggests entrepreneurs can obtain assistance similar to unemployment benefits when starting a new business. It’s called Self-Employment Assistance and is characterized as a drop-in replacement for unemployment benefits for those who have become jobless and are looking to start a new business.

Rather than pay people to be unemployed, the program pays people to create businesses that in turn can create even more jobs. Unfortunately, only about seven states participate in the program and California isn’t one of them. I asked around at the California EDD, but no one seems to know what I’m talking about.

It’s really a shame. By the figures, there are hundreds of thousands of perfectly capable people that have been laid off in the past month alone. These are experienced people that can become contributors to renewed growth by creating new businesses.

While I agree with Paul’s thoughts and feel they are well-placed, I am quite certain we can find 10,000 jobless entrepreneurs in our own country perfectly willing to try their hand at starting up a company. There is a program available to encourage them to take this step, but unfortunately many of our states don’t subscribe to it.

A Zenfolio WordPress Plugin

I came across Derek Powazek’s superbly simplistic DePo Clean theme a couple days ago and finally got around to installing it. It needs the flickrRSS plugin to run. I do not use flickr for my photo storage–Zenfolio was my prime choice after reviewing a variety of services. Unfortunately, flickrRSS does not work with Zenfolio. I could not find an alternative so I used Dave Kellam’s flickrRSS as a model to create a plugin called ZenfolioRSS. You can see the results above.

Update [11/5/2007]: I’ve placed a download link for the plugin below. You should use the flickrRSS CSS styles to customize the look, making this a drop-in replacement for flickrRSS. To install, place the zenfoliorss.php file in the wp-content/plugins folder. You need to enable the plugin through the Plugins interface in the WordPress admin site and then configure the plugin by going to Options > ZenfolioRSS-the main option you need to include is the base URL to your Zenfolio site (e.g. In your theme, add “<?php get_ZenfolioRSS(); ?>” without the quotes where you want to see the pictures. If you’re replacing flickrRSS, replace the “get_flickrRSS()” text with “get_ZenfolioRSS()” in your code.

Download Link: ZenfolioRSS Homepage

Mass renaming files in Linux

ls -d *.ext | sed 's/\(.*\).ext$/mv "&amp;" "\1.newext"/' | sh

Explanation here: Mass renaming with Linux shell

StimTV/NPOWR wins an Emmy!

I found out last night that my company, NPOWR Digital Media, has won an Emmy! It’s great to finally see that the technology I’ve been pouring blood, sweat, and tears into for the past year has finally received recognition and validation. The company itself has been building the idea for at least five years now, but only in the last year have we started bringing the ideas into fruition.

We were nominated a couple months ago, but the entries we were competing against were major guns that included ABC, AOL, GameTap, Revver, and VONGO. The award is for Outstanding Innovation and Achievement in Advanced Media Technology for Best Use of “On Demand” Technology Over the Public (open) Internet. Quite a mouthful of words there, but an Emmy nonetheless against great odds. The link to the nominations is here, and the link to the winners is here.

I’ll link our press release when it is ready (we didn’t think we were going to win, so we didn’t have a press release ready). Here are some low quality shots off my Samsung i320n:

Technology & Engineering Emmy Award

← Before