Ben Chuanlong Du's Blog

And let it direct your passion with reason.

Get CentOS Version

You can get the version of CentOS using the following command.

rpm -q centos-release

This trick can be used to get the version of the CentOS distribution on a Spark cluster. Basically, you run this command in the driver or workers to print the versions and then parse the log …

Convert PDF to EPS

There are tons of tools for converting PDF pictures to EPS pictures in Linux. The pdf2ps command is a good one. It produces EPS pictures without losing much resolution. The general purpose tools convert (from the ImageMagick package) does not produce as good quality EPS figures.

Best Filesystem Format for Cross-platform Data Exchanging

FAT32

FAT32 is an outdated filesystem. The maximum size for a single file is 4G. You should instead exFAT instead of FAT32 where possible.

exFAT

exFAT is great cross-platform filesystem that is support out-of-box by Windows, Linux and macOS. There is practically no limit (big enough for average users) on …

Fonts for Linux

  1. ttf-arphic-uming, ttf-wqy-microhei, ttf-wqy-zenhei, xfonts-wqy and ttf-opensymbol are some packages related to Chinese fonts.

  2. If you have Adobe Reader installed on your computer, you can use Adobe Chinese fonts for free.

  3. To check Chinese fonts installed on your computer, you can use the command fc-list :lang=zh-cn | sort.

  4. To install extra …

Install Newer Version of SQLite3 on Debian Jessie

  1. Open /etc/apt/sources.list and add the following line to the end.

    deb http://www.backports.org/debian jessie-backports main contrib non-free
    

    or

    deb http://ftp.us.debian.org/debian/ jessie-backports main contrib non-free
    deb-src http://ftp.us.debian.org/debian/ jessie-backports main contrib non-free
    
  2. Make sure the GPG …