Essential Gnome Shell Extensions for Gnome 3 Users

Gnome Shell has a clean design. But many users want to get more from the desktop environment. Gnome 3’s extension system can help users customize the Gnome Shell’s look greatly. In this post, we summarize 6 extensions we considered essential to make Gnome Shell great. AlternateTab ∞ Make Alt-Tab “classic” instead of grouping windows by application. It substitutes Alt-Tab with a window based switcher. » Read more

Running a Command Upon Files or Directories Changes on Linux

Doing actions upon changes of files and directories is very useful. Examples like compiling a project after the source code files are changed, sending emails after important configuration files are modified, building the PDF after a TeX file is modified. On Linux, the inotify-tools provide good support for trigger actions after changes. In this post, I will introduce a small tool which continuously runs a command upon certain files and directories change. » Read more

Improving ssh/scp Performance by Choosing Suitable Ciphers

Update on Oct. 9, 2014: You should be aware of the possible security problems of blowfish and it is suggested not to be used. Instead, you may consider ChaCha20 as suggested by Tony Arcieri. To use this with OpenSSH, you need to specify the Ciphers in your *.ssh/config* files as possibly with another default one since only newer vesion of OpenSSH supports it. » Read more

Making Emacs Startup Faster

I use Emacs in terminals and start/close Emacs frequently as needed like in a file checking-editing-closing loop. However, Emacs seems take some time to start up especially some heavy modes are used. How to make Emacs start up faster? (If you just want the solution/script first, find the command in the summary section.) My solution is to make use of the server/client feature of Emacs ∞ This is how it works. » Read more

Customizing Fonts in Gnome 3

Gnome 3 is great and I can understand that it emphasizes on simplicity. However, the configuration settings for Gnome 3 does not provide tools for certain functions that I need. One of them is customizing the fonts. This post will summarize the tools/tips that I adopted to customize the fonts in Gnome 3. Usually, the settings will take effect after being changed. » Read more

Vim Howtos and Tips

Vim is a fast and handy editor on *nix systems. Like Emacs, Vim has a steep learning curve as you get constantly get new things. However, the effort deserves it as you efficiency is highly improved. Here, I summarize the tips and howtos I learned using Vim. Some previous posts on vim are tagged with vim.Table of Contents [hide]1 My .vimrc and .vim file1.1 How to use these files2 Previous posts tagged vim 3 Latex Writing in Vim with the Help of vim-latex3.1 master file 3.2 List references to sections, figure and tables to insert 3.3 List citations from the bibtex file to insertMy .vimrc and .vim file ∞ My .vimrc and .vim files: How to use these files ∞ cd /path/to/vim-config/ git submodule update --init If you never configured Vim: cd ln -s /path/to/vim-config/.vimrc ./ ln -s /path/to/vim-config/.vim ./ If you ever configured your Vim, you may need to merge my configurations to yours. » Read more

How to Find Out Failed Disks’ SATA Ports in Linux

The Linux disk names (e.g. sda1, hdb3, etc.) are not reliable—they may be changed if there are hardware changes, such an adding or removing a disk. Additionally, the order for the Linux device names is not always the same as the order of SATA poets. For example, the disk connected to SATA port 0 (first port) is not always sda. It is possibly that you are in a situation like this: I find one disk failed on my server which have several ones installed. » Read more

HP Compaq BIOS Crisis Recovery from a Failed BIOS Flashing Using a USB Flash Disk

I tried to flash my HP Compaq CQ35-240TX’s BIOS to F.15 but unfortunately failed. The computer turned to white screen. When I restarted (powered off then boot again), this is no response any more: the hard disk and caps lock’s LED keep blinding. I thought “Oh my God! I must send it to HP to repair it!”. But after searching on the Internet and find there is a “crisis recovery” mechanism to recovery the BIOS even the CMOS don’t work. » Read more

Thunderbird Tips: Default Descending Email Sort Order and Inline Quote When Reply

Thunderbird is a great email client and what make it special is deeply configurable like Firefox. For me, I like to view email in the descending sort order and inline quote relied email content when replying emails. Let’s look at how to set the default order as descending sort order and quote mode as inline in Thunderbird. We can do this by setting configuration parameters of Thunderbird using its config editor. » Read more

Keep Firefox Open After Closing the Last Tab

Firefox should always be ready there for us, right? Even after we closing the last tab, we would like firefox to be still open. At least I like to treat it in this way. But unfortunately, Firefox will close after we closing the last tab as default in version 3.5. But the good news is that this behaviour is configurable  through Firefox’s configuration editor. » Read more

Thunderbird中使用Google Calendar及它的SMS功能

Google Calendar可以自动发短信提醒,这是一个非常棒的功能.为何不把它集成到Thunderbird中来呢. 首先安装Thunderbird的插件: Lightning 0.9 然后下载: Provider for Google Calendar 0.5.2 provider默认加入的提醒是pop-up.其实要把它改成sms非常简单: 将下载下来的.xpi文件unzip, 它就是一个zip包:) 然后修改其中的calGoogleUtils.js JavaScript文件, 将其中的两个pop-up修改为sms. 然后打包,再到Thunderbird下安装即可. 这样就把Google Calendar和Thunderbird集成到一直来啦. » Read more

Hashing Library for C

I try to find some Hashing libraries for C and find several good ones. The hsearch function in the GNU C library. There are other methods to organize information which later should be searched. The costs of insert, delete and search differ. One possible implementation is using hashing tables. The following functions are declared in the header file search.h. CMPH – C Minimal Perfect Hashing Library. » Read more

Vim + cgdb

I begin to use vim for programming. I like the tools that focus on one function. I used to use emacs. But I think I like vim more. For debugging, I use gdb. But I use the front end cgdb. I can see the codes with the cursor when debugging. I can use F8 for next instead of n + enter. » Read more

Vim Indenting C/C++ Code

Vim provides some basic formatting commands. A combination of these commands with the editing commands will make the programmer happy. A list of basic text formatting commands in Vim:= is an operator that formats/indents text. i{ is a text object that specifies the surrounding code block. It should be used together with v, =, etc.Some basic but useful operation that are combination of the two basic ones above:vi{ visually selects the inner code block around the cursor. » Read more

Controlling Display of WordPress Widget with PHP Code

I am always wondering how to display different Widgets in WordPress depending on the page/post/category etc. I ever tried some plugins that is for specific purpose. However, they are not flexible enough for all my needs. For example, I want a widget that contains AdSense ad not display on certain posts that I selected and marked by the post meta, which is not easy to control with some plugins that only support limited integrated controlling options. » Read more

A Style of pre Tags in WordPress

I use <pre> tag a lot in the html. I believe the guys that usually past codes into the pages will like it too. I use the pre tag to list programming code such as C/C++, php, Linux shell output and some other content that is suitable for Monospace font. The effect is like that it has a scroll bar and it has a solid frame which will make it clear. » Read more

Put the Categories, Archives and All Posts into Pages

I prefer putting pages that contains all the categories, archives and even all the posts in one page to putting these links in the side bar. Actually, most of time it needn’t to stay on every pages. And if it is in the side bar, the search engine will see these links in every page and think it is very important while it is not so important. » Read more

Change WordPress’s Excerpt Length

The default excerpt length of WordPress is 55 words. Some one like me may want to change the excerpt length. I like the have a smaller excerpt length for the homepage. WordPress provides a interface for changing the default excerpt length. The method is very simple and easy. Put these codes into the function.php file in the theme directory. I prefer 35 in my blog. » Read more

Use noindex Meta Tag in WordPress to Prevent Search Engine Indexing Categories, Tags and Archives

WordPress has the content duplication problem which may confuse search engines. Duplicate content won’t hurt you, unless it is spammy or keyword stuffing, as said by Matt Cutts, and Google may just ignore the duplicate content. However, instead of letting the search engines decide which pages of the duplicate ones are important, we may only want the search engine to index the posts and pages instead of categories, tags or archives. » Read more