3/30/09

Insert equation in blogger

The nice Yourequations allows you to render LaTeX inside blogger, for example:


\int_{-\infty}^{\infty}e^{-x^{2}}\;dx=\sqrt{\pi}

11/30/08

How to convert eps to png ( eps2png ) in the Linux shell:


gs -dNOPAUSE -dBATCH -sDEVICE=pngalpha -sOutputFile=filename.png -r300 -dEPSCrop filename.eps

11/16/08

Text files which are too big to be decompressed as the ones in Wikimedia Downloads, should be better read with bzcat or some similar tool. To read files in bz2 format in a cat like fashion, so:


$ bzcat huge_file.bz2 | ./my_program


Or, just to read it on the screen:


$ bzcat huge_file.bz2 | more


To read files in a 7z format using a cat fashion stuff (no, 7zcat doesn't exist, as far as I know) use:


7z x -so even_bigger_file.7z | ./my_program

11/11/08

Sorting lines alphabetically in vim. See that. Very useful, for example, if you want to sort includes in a c/cpp file:

In visual mode, just mark the part to be sorted and type:

!sort
How to merge PDFs in Linux shell :

gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=out.pdf in1.pdf in2.pdf in3.pdf ...