HOWTO: Linux "Traffic Shaping" with stock "tc"

My wife really likes to play Farmville. My boy really likes to play World of Warcraft. I really like to keep a local Debian mirror at my house. We have a 1.5Mbps down, 1Mbps up DSL connection. There are thus…issues if two or three of us are trying to do our thing at once. (How can Farmville hog that much bandwidth? I don't know. I just don't know.)

My gateway box is a full-on Linux machine. Since forever, the Linux kernel has had facilities for so called network "traffic-shaping" / "packet scheduling", with which the gateway can control latency and bandwidth of network traffic routed through it to achieve some semblance of fairness. Figure out how to set it up is, well, let's just say "hard"…