Java Regex

regex: Java Glossary

Jash: The Javascript Shell

With Jash, you can execute/run you javascript code within command line, and see the results as console output.

Click to Open Jash

Backup your firefox passwords

1. The manual way:
--- copy following three files from your profile folder to the place you want to back them up to:
  • signons.txt
  • signons2.txt
  • key3.db

2. Use Firefox Password Explorer Addon:
--- Install and use Firefox Password Explorer Addon

Secure Anonymous FTP with vsftpd

vsftpd is an ftp server software available on Linux. To setup an anonymous ftp server on Debian/Ubuntu Linux,

1. Install vsftpd: apt-get install vsftpd
2. Follow this tutorial to setup...

makeself: Make self-extractable archives on Unix

makeself is a small shell script that generates a self-extractable tar.gz archive from a directory. The resulting file appears as a shell script (many of those have a .run suffix), and can be launched as is. The archive will then uncompress itself to a temporary directory and an optional arbitrary command will be executed (for example an installation script). This is pretty similar to archives generated with WinZip Self-Extractor in the Windows world. Makeself archives also include checksums for integrity self-validation (CRC and/or MD5 checksums).

To install it on Debian/Ubuntu:
apt-get install makeself

Here is an example, assuming the user has a package image stored in a /home/joe/mysoft, and he wants to generate a self-extracting package named, which will launch the "setup" script initially stored in /home/joe/mysoft :

  • makeself /home/joe/mysoft "Joe's Nice Software Package" ./setup



List of websites blocked in China

Check here for the list of websites blocked in the People's Republic of China.


GRUB 2 Installation and Configuration

Grub2 supports high resolution background, e.g. 1024×768, 1280×800, supports more picture formats, e.g. JPEG, PNG, TGA, and 24bit true color. This tutorial will guide you to install and configure grub2 to replace grub.

Note: The tutorial is based on Debian Lenny. But it should be usable on Ubuntu or Debian etch.

fcitx 中文输入法

Fcitx(Free Chinese Input Toy of X) is a collection of Simplified Chinese input methods for Linux. It supports Pinyin, QuWei and Table-based input methods.

Project web site at

goosh: unofficial google shell

goosh is an online command line interface for google services.

Try http://www.goosh.orgLink

WINE Examples

Here is a collection of examples how to use WINE to run Windows applications on Linux.

instalinux: customize your linux installation cd iso image


This is a simple, easy way to install Linux. You follow the steps in the System Designer to choose from a bunch of different distributions and versions of Linux, and to choose what software you want included. The final product will be a fairly small ISO image (30 MB or less) that you can burn to a CD and boot from. It will automatically build your system for you, pulling what it needs from the network mirror you selected, while you sit back and relax.

Note: Instalinux uses LinuxCOE

Debian Linux 参考卡片

下载Debian Linux 参考卡片(PDF)

HOWTO: blogger sitemap

Here is an tutorial that describes how to create and add your blogger site's sitemap to Google Webmaster Tools.

Join binary files into one file

On Windows Platform, open a Command Prompt Window, type:
  • copy /b file.part1 file.part2 file
On Linux/Unix, type following command in the terminal window:
  • cat file.part1 file.part2 > file
See also here

Linux Tutorials at

You can find tutorials about Linux at

GUI Text Editors for Linux

  1. gvim: gtk based vim.
  2. gedit: default text editor for gnome
  3. kate: text editor for KDE
  4. kwrite: text editor for KDE
  5. scribes: gtk based text editor
  6. mousepad: default light-weight text editor for XFCE

pydf: colourised df clone to check your disk space

1. pydf is a colorised df clone to check the free disk space within command line.

2. To install it on Debian/Ubuntu Linux:
  • sudo aptitude install pydf
3. To check the disk space status
  • pydf

btrfs: next generation of file system for Linux

btrfs is Btrfs is a new copy on write filesystem for Linux aimed at implementing advanced features while focusing on fault tolerance, repair and easy administration. Initially developed by Oracle, Btrfs is licensed under the GPL and open for contribution from anyone.

btrfs has been merged into Linux kernel 2.6.29. is a good blog about Ubuntu Linux in Chinese.

Chakra Live CD - based on Arch Linux

Chakra is a free, user-friendly and extremely powerful liveCD and/or operating system based on the award winning K Desktop Environment and on the GNU/Linux distribution for connoisseurs: Arch Linux. With rolling releases, freshly cooked packages, our graphical tools and a small but strong and diverse community, it is the computing environment you may have been waiting for. Our and Arch's community-driven development is grounded in the concept of KISS, which has been proven to be superior for people who really want to learn something about Linux or dont want to deal with administrative overhead, or are just lazy nerds like ourselves...

Download it from here.

How to check Ubuntu Linux Version

Method 1:
  • cat /etc/issue

Method 2:
  • sudo lsb_release -a

FatRat: A open source download manager for Linux


Fix GPG Error on Debian Linux

GNOME keyboard shortcuts

KDE keyboard shortcuts

Enable Google Analytics for your blogger blog

I. Generate Google Analytics Tracking Code
  • 1. Login to
  • 2. Click "Add Website Profile" link at bottom-left of the page.
  • 3. Input your blog URL: for example,
  • 4. Click "Finish" button.
  • 5. Ctrl+C (or CMD+C for Mac OS X) to copy the tracking code block generated.
II. Install the tracking code to your blog
  • 1. Login to
  • 2. Under the blog you want to install Analytics tracking to, click on Layout.
  • 3. Click on Edit HTML. An editing screen for your blog template's HTML displays.
  • 4. Paste the tracking code to just before tag. You can put your cursor right before that tag.
  • 5. Paste the Google Analytics Code Block by Ctrl + V or CMD +V.
  • 6. Click Save Changes.
Now you have installed the tracking code.

III. Check the status of Google Analytics

  • 1. Go back to
  • 2. If the status of the newly added profile of your blog site is "Receiving Data", it means that Google Analytics has been enabled. You have done.
  • 3. If the status is "Tracking not installed", click "Check Status". And refresh the page.

Ubuntu 中文字体美化方案大全 (1): 概述篇


不过,很多用惯了Windows或者苹果系统的Ubuntu用户还是觉得Ubuntu的字体不够舒服。的确,Ubuntu自带的免费UMING中文字体(还有免费文泉驿宋体)都不如Windows XP的SimSun宋体,或者Windows Vista的雅黑字体,或者苹果系统的黑体好看。

  1. 使用Windows XP字体方案;
  2. 使用Windows Vista字体方案;
  3. 使用苹果字体方案;
  4. 使用免费文泉驿正黑字体方案;
  5. 使用免费文泉驿宋体;
  6. 使用免费UMING字体(Ubuntu默认)

(1) 使用fontconfig配置Linux字体
fontconfig 是Linux用于字体配置管理的软件包。fontconfig使用XML文件存储字体配置文件。这里是其XML语法帮助文件。

(2) Ubuntu的fontconfig配置简析
Ubuntu Linux 的系统字体配置文件保存在/etc/fonts目录。/etc/fonts/conf.avail/ 子目录内保存的是所有可用的配置文件,/etc/fonts/conf.d/ 子目录内是文件链接(Symbolic Links),连接到/etc/fonts/conf.avail/ 内的文件。/etc/fonts/conf.d/的文件链接是系统正在使用的配置文件。(配置过Apache 2 的用户应该对这样的目录设置不陌生。)/etc/conf.d/内的文件(连接)名都是以数字开头,比如69-language-selector-zh-cn.conf。系统载入这些配置文件也是以这些数字为序的。比如69-language-selector-zh-cn.conf 要先于 99-language-selector-zh.conf。

(3) Ubuntu Linux 中文简体配置文件(基于7.10以后的版本,包括7.10, 8.04,和8.10。以后的版本也可能有所变化)

a. /etc/fonts/conf.avail/69-language-selector-zh-cn.conf
b. /etc/fonts/conf.avail/99-language-selector-zh.conf

(4) Ubuntu Linux配置字体常用的Linux命令

a. sudo fontconfig-vodoo -s zh_CN
此命令用以设置简体中文所需的.conf文件。(把/etc/fonts/conf.avail/69-language-selector-zh-cn.conf 和 /etc/fonts/conf.avail/99-language-selector-zh.conf 链接到 /etc/fonts/conf.d/ 目录,以便XWindow系统启动时载入)。

b. sudo fc-cache -fv