Edit HTML in Emacs with web-mode

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...
「點我閱讀更多」

Iterator and Generator in Perl

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...
「點我閱讀更多」

Optimizing PDF with Kindle

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/...
「點我閱讀更多」

Unix is Friend - Getting Help

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. ...
「點我閱讀更多」

Fast Parallel Download with lftp

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 download...
「點我閱讀更多」