Author Image

Michael Chen 的技術文件

程式設計、開放原始碼軟體、技術雜談

Cover image

Emacs has a built-in html-mode for HTML files. It is common that HTML files comes with other lauguages like CSS, JavaScript, PHP and so on. The built-in html-mode cannot handle these non-HTML parts well. For example, the indent of these parts in html-mode doesn’t work well. If you need an alternative major-mode for HTML, you can consider web-mode. web-mode.el is an Emacs major-mode for editing web templates; it supports many 繼續閱讀

Cover image

To generate a list of numbers, Perl provides the syntax .. (double dots). However, the syntax only provides ascending sequences with 1 increment. What can we do if we need more flexible sequences in Perl? In the following example, you can see that .. only generate an ascending sequence. # print out 1 2 3 ... 10 $ perl -le '$, = " "; print (1..10);' # print out nothing 繼續閱讀

Cover image

I bought a new Kindle. When I tried to read some PDF files on Kindle, I found that the font size was too small to read. If you need to read PDF files on some small size devices like 4-inch smartphones or 6-inch e-book readers, you can optimize these PDF files for these gadgets with k2pdfopt. k2pdfopt is a command-line utility to optimize PDF/DJVU files for mobile e-readers and smartphones. 繼續閱讀

Cover image

Unix is like carpenters’ toolkits; you need to learn them before you really enjoy them. Self-help learning is rewarding and amusing, which also applies to the learning of Unix. Basically, there are three levels of sources to learn Unix: Books about Unix (or Linux). Online webpages, blogs, forums or other web resources System manuals. The list is roughly ordered by the degree of difficulty. We’ll explain these sources one by 繼續閱讀

Cover image

I was assigned by my professor to download some RNA sequences data to my own computer for backup purpose, because the original data server will clean these data. These data are dozens gigabytes in size, but the connection speed of the network in my house is not fast. Therefore, I chose lftp to speed up the downloading rate by parallel downloading. lftp is a sophisticated ftp/http client and a file 繼續閱讀

Cover image

Sometimes there are no available desktop or laptop running Unix or Linux, but we miss these utilities on Unix. Thanks the efforts of numerous communities and companies; the utilities of Unix are ported to Windows in different projects. We’ll introduce some of them. Cygwin Cygwin is a large collection of GNU and open source tools and a simulated POSIX layer on Windows. You may think Cygwin a self-contained mini Unix 繼續閱讀

Cover image

Go is an open source programming language. Go source can be easily compiled into native binaries of several platforms, which brings the potential of application programming. I’m learning the new language on my spare time. Here is my notes for Go language. The contents may change during my learning process. Install Go on Unix The main toolchain of Go language can be placed in any place and you need to 繼續閱讀

Cover image

Instead of single application for a proprietary file format, Unix utilities manage text streams. Text streams means not only text files but also command line inputs and outputs. Unix comes with several handy text processing utilities. These tools co-operates well with text streams. Therefore, you should save your documents in plain text formats whenever possible. Here we briefly introduce some of them. Before we jump into these utilities, let’s look 繼續閱讀

Cover image

Many files on Unix are plain text files. Some examples are text files, markup language files, LaTeX files, source code, Makefiles, and configuration files. Unix utilities also works better with text files. Besides, proper editors help us editing text files productively and effectively. Emacs and Vim are the two most famous editors in Unix world. If you want to enjoy good user experiences on Unix, you may start with Vim 繼續閱讀