How to shape traffic in Linux using the kernel tc funcionality

A very nice guide I’ve discovered recently:
http://mark.koli.ch/slowdown-throttle-bandwidth-linux-network-interface