2012-07-28

How to bulk resize JPEG pictures via Imagemagick

Sometimes you need to reduce the size of many pictures, for example to share them on the internet.

A nice way of doing this is via Shell:

convert FILE.JPG -resize 2448x1836 ./smaller_pictures/FILE.JPG

Or by using a for loop:

for F in *.JPG
do
convert $F -resize 2448x1836 ./smaller_pictures/$F
done

2012-07-17

How to get nice Python Syntax Highlighting in LaTeX documents

Pygmentize is a command that can be performed on a python Script to produce a .tex document with nice syntax highlighting

pygmentize -f latex script.py > script.tex

2012-07-14

How to install .deb packages on Linux

$ sudo dpkg -i package.deb

2012-07-08

Pickle module in Python

The pickle module in Python 2.3 can be used to save a dictionary in a file and makes it accessible for later.

import pickle

((I will add more information later))