Backup Discourse with External PostgreSQL Server

Posted on: Sun, 01/21/2018 - 05:58 By: Huahai

Discourse is a modern forum software that is quite popular in the technology circle. One can install a Discourse server easily with the recommended method of using docker. All the services needed by the Discourse server, e.g. Postgresql and Redis, will be running inside a docker container, which is fine for a small installation. However, if one has already an external Postgresql server running, e.g.

FreeIPA in AWS EC2

Posted on: Thu, 12/07/2017 - 23:34 By: Huahai

Show how to install and configure freeIPA server and clients in AWS EC2 using Route53. Point out several important issues.

Thinkpad Hotkeys in KDE4

Posted on: Wed, 12/01/2010 - 22:00 By: Huahai

I have kept my Thinkpad X61 laptop up to date with Debian sid for a few years. The KDE4 in Debian sid is at version 4.4.5 at this moment, and I think it is mature enough for me to switch the laptop power management from my own hacked up solution to a KDE integrated one. My old solution still works for the most part, but there are some glitches after repeated supsend-resume cycles. As the system keeps evolving, I suspect more things would break.

Suspending to RAM on Debian laptop

Posted on: Fri, 04/18/2008 - 00:39 By: Huahai

I am tracking Debian sid on my Thinkpad laptop, a few months ago it started to use pm-utils and broke suspending to RAM (sleep) functionality. Basically, the machine would go to sleep then immediately resume.
It turned out that this problem can be easily fixed by creating a file /etc/pm/config.d/local, and put in a line


The reason is that pm-utils by default does not unload Ethernet card module e1000, so the machine would be waken up by Ethernet card activities.

How to load context of text files into DB2

Posted on: Sat, 12/29/2007 - 00:48 By: yunyao

The task is fairly simply --- I need to load the content of some text files into DB2. There are many ways to do so, but since I only need to this only once (hopefully), I want to find an easy way without writing any external code.

So here is the solution:

(1) create a table containing a CLOB (VARCHAR should work as well, if we know the maxium size of the files in advance) column. For example:


An Mac Look for my KDE Desktop

Posted on: Wed, 12/05/2007 - 10:04 By: Huahai

Although I have never laid my hands on an Apple computer, I have seen people going crazy about them. I remember seeing some kids shouting hysterically in front of Apple store on the release day of Tiger a few years ago. The user interface of Apple's OS is said to be one of the selling points. So when I was feeling tired of Mepis Linux's default look last night, I decided to try an OS X look for a change. It turned out to be relatively easy to do.

KDE widget Basically, getting an OS X Tiger look and feel on KDE involves installing a theme that imitates its look and feel. There is a KDE theme called Baghirathat does just that. It's so popular that Debian sid has it in the pool, so

Use Vim as Info Page Browser

Posted on: Thu, 11/29/2007 - 07:56 By: Huahai

In this post, I set up vim as a manual page viewer, using ManPageView plugin. It turned out that the same plugin can be used to view info pages as well. All one needs to to is to add ".i" suffix to the command that you are seeking help on. For example, ":Man sed.i" will show the info page for sed. With this information, we can set up vim as info page browser, just add these lines in ~/.bashrc:

Reverse/Forward Search with Latex-Suite in Vim

Posted on: Thu, 11/22/2007 - 17:19 By: Huahai

When editing a long Latex document, it is beneficial to be able to point from current location in DVI back to Tex, and vice visa. This is what called reverse/forward search between DVI and Latex. With Latex-Suite in Vim, this functionality is already implemented, and there's no need to specify "\usepackage scrltx" in the Tex file. However, it's not fully configured by default. Forward search with "\ls" works, but inverse search by "Ctrl-Left click" in xdiv is not enabled.

kmail hangs due to missing loopback interface

Posted on: Thu, 11/22/2007 - 01:50 By: Huahai

My /etc/network/interfaces got deleted when I removed mepis-network package. Everything was fine, except that kmail would hang since IP address doesn't exist. It took me half an hour to figure it out. Had to create the file with these lines in it:

auto lo
iface lo inet loopback

Now things went back to normal.

Subscribe to Linux