Use ‘optipng’ to optimize/re-compress your png images losslessly!

OptiPNG is a useful tool to compress png images without loss its quality, it really help reduce the bandwidth, diskspace and the loading/response time for website. I used it to re-compress all the png images on cdnjs and successfully made 206857 images smaller(see cdnjs/[email protected]).

It’s easy to use, you can install it via apt-get, or download and build it from source :
$ sudo apt-get install optipng

$ optipng example.png

The default compress level is 2, the range is 0~7 (may depends on the version you are using), I will always use the highest and slowest level:
$ optipng -o7 example.png

Find all the png images to compress:
$ find path -name "*.png" -exec optipng -o7 {} \;

In fact, optipng can convert BMP, GIF, PNM and TIFF format image to optimized optimized png, and also performs PNG integrity checks and corrections, very nice.

Linux tricks – the ‘the Matrix’ like effect via cmatrix

cmatrix is a program make your screen looks like the Matrix, one of the most interesting action movie.

Install cmatrix via apt-get:
$ sudo apt-get install cmatrix
And just run cmatrix:

Linux tricks – make the commandline out funny by cowsay

Let’s make the output funny.

Install cowsay on Debian/Ubuntu GNU/Linux:
$ sudo apt-get install cowsay

Pipe text steam to cowsay
$ ls / | cowsay

Replace cow with the Linux mascot:
$ ls / | cowsay -t tux

Just for fun, haha.