Setup sub domain on another server machine

Recently I am working on migrating our site to a new theme (you can see why, don’t you?) So I setup an apache instance on our test server, and try to apply the new theme there first. It’s not a very straightforward task. I often need help from the vendor’s tech support. But sometime even the support guy couldn’t tell what went wrong just based on my description. The best way for him to debug is, logging into my test server’s web console, and checking things from there. This needs to expose my internal test server to outside traffic.

Setup OpenVPN Client on Mac OSX

Recently I bought this new router: ASUS RT-N16 Wireless-N Gigabit Router. Once I got it, I flashed it with tomato firmware, which I have been using for years, and am very happy with its stability and feature set. This time I chose a slightly different variation: Tomato USB, not only because it supports USB ports on the router, but also because it has built-in openVPN. The firmware I used is this one: experimental VPN firmware for Kernel 2.6, MIPSR2 Routers.
I followed the instructions from this link to set the VPN server, and my client configuration. As to the vpn client software, since I have a Macbook Pro, the Tunnelblick from Google becomes the number one choice.
However, after setting up the client side configurations, once I started Tunnelblick, my Macbook couldn’t get an IP address from the VPN server, even though the secure …

The Road to A Perfect HTPC (2) — The Hardware

Once I decided to build a PC, the next step was to choose hardwares. Since it gonna sit in my living room side by side with the receiver, it can’t look too shabby. It must be quiet as well. I definitely don’t want a box that whines all the time when I am watching my favorite movie. Also, I don’t want to break my bank to build this HTPC. I just need it to be fast enough to handle all my digital contents. In the future, whenever needed, I can easily upgrade it.
This was not my first time to build a PC from scratch. Actually, almost all my desktop PCs were built manually. But I hadn’t built one for more than a year, so I had to catch up with the latest technology. There are so many good resources online, about motherboard, CPU, video card, … but I found

The Site Has A New Look … On Your Android!

Since this PairUp game gets popular, we notice that more and more traffic to our site are from Android phone. But we know the site is not really mobile friendly, so we decided to do something about it.
Just now, we installed a mobile plugin for WordPress — yes, our site is powered by WordPress — and it turns out very nicely. Here is a screenshot from the G1 Android phone:
Hopefully this update can make it a little easier for those friends who enjoy surfing the Internet with mobile phones. As to the plugin we use, it’s from here. As you can tell, it’s such a great plugin for WordPress!
By the way, stay tuned, another update of PairUp is coming very soon!

Set Default File Permission For a Specific Directory

I have a powerful desktop, — and yes, runs Linux. It has a quad-core CPU, and 10GB RAM. My wife only has a small laptop. So, when she needs to do more serious work, like photo processing, she logs in my machine (using her own account) to do it.
And then we have a problem. All our pictures are stored in one shared repository, which is a directory under “/var”. Any file or picture I created in that directory, automatically received the ownership “my_user_id:users”, where “users” is my default group; and the default permission for the files I created are 744, which means my wife can’t modify it without changing the file permission first; and vice versa.
That’s really inconvenient. So I want to find a way, to achieve following goals:

Any file / directory we created in our repository, must have group “family”, which is a group I created for just two …

SCIM on NX Client

I work remotely a lot. So NX client is my best friend. It is fast, even under crappy Internet connection in a coffee shop.
But occasionally I need to input Chinese. I installed SCIM on my home machine, and it works beautifully when I work locally. However, it didn’t work when I use NX client to remote-desktop back to my home machine. After some research, I found I had to put following lines in my .bashrc file to make it work:

export LC_CTYPE="zh_CN"
export GTK_IM_MODULE=scim
export QT_IM_MODULE=scim

After this, everything worked beautifully again.

Setup ViewVC / Subversion with Apache Server on OpenSuse (2)

Ok, it is not done yet. I found another problem today.
Everything worked great in my home network. But today, when I tried to check out code from outside network, I found a problem. I didn’t open port 22 for my home server. Instead, I open a non-stand port on my router and forward traffic on that port to port 22 at my home server. But when I use svn+ssh, it seems there no way to specify port number.
After some research, I found all you need to do is to change the configuration file of the subversion on your local machine (at outside network). Open file “~/.subversion/config”, then go to section “tunnel”, add following line:

ssh_home = $SVN_SSH ssh -p 12345

Port 12345 is the non-standard port opened on my router. Then on my local machine, I use this command to check out code:

svn co svn+svn_home:// sandbox

Problem solved!

Setup ViewVC / Subversion with Apache Server on OpenSuse

Recently I tryied to setup a development server at home. It’s pretty easy to install the subversion server since there are so many great tutorials online. I don’t want to use HTTP protocol to remote access my code repository because I always like svn+ssh better. But I do want a web interface to browse my repositories and compare the difference between reversions. So ViewVC becomes my nature choice. To be more specific, I want to be able to access the source tree from my home network freely; if from outside network, I want some basic security so that my code is not share with the whole world for free.
It’s not that hard either. But I did spend some time to figure out the security stuff. After all, I am not a system engineer. Anyway, after it is done, I restarted the Apache server, and everything worked beautifully. Actually …

Setup a Unbreakable SSH Tunnel

My company doesn’t have VPN setup. To be able to work from home, usually I have to setup a reversed ssh tunnel from office to my home server (my home router forwards port 12345 to my home server port 22) by running this command from my office machine:
ssh -R 10000:localhost:22 -p 12345
In this way, when I get to home, I can connect to my office by command:
ssh -p 10000 localhost
But the ssh session sometimes got timed-out and then I couldn’t connect back. It happened several time and I eventually got annoyed. To keep my connection always alive, I created a file ~/.ssh/config:
Host *
Protocol 2
TCPKeepAlive yes
ServerAliveInterval 60
This helped a lot. But later, my company had some network issues and sometimes the network was down for hours. This broke my tunnel again. So I went even further and tried to find a solution to always keep my tunnel up — …

Install Skype on OpenSuse x86_64

More than a year ago, when I chose OpenSuse as my desktop OS, clearly I made a wrong decision — I mean, OpenSuse is very good, but I shouldn’t have chosen the x86_64 version. There are just too many compatibility issues.
Anyway, I don’t want to reinstally my OS yet, so I have to deal with it. Here is how I installed the 32-bit Skype on my 64bit OS:
# 1. download the static version of Linux Skype
# The file I got is skype_static-
# 2. untar it to my “apps” directory, where I usually keep all my customized applications
tar xjvf skype_static- -C ~/apps/
# 3. get 32-bit
cd /tmp
rpm2cpio libsigc++20-2.0.17-1.i386.rpm | cpio -idv
cp /tmp/usr/lib/ ~/apps/skype_static-
# 4. create a script to start skype in /usr/bin
sudo vi /usr/bin/skype
# following is the script for /usr/bin/skype
cd ~/skype_static- && ./skype &
# 5. make sure the new skype script is executalbe
sudo chmod 755 /usr/bin/skype
Now Skype can …