I saw this tip in Mountain Bike Action magazine awhile back and I thought I’d share it:
If you have an old innertube laying around, cut off a small strip of it and slide it over your handlebar to rest on your grip, or somewhere else out of the way (pic 1). Then when you’re leaning the bike against something and wanting it to stay put, stretch it over to the brake lever to keep contant tension on it so the bike won’t roll away (pic 2). I tried it the other day when I was re-assembling my wife’s bike and found it worked really great. It’ll also keep your wheels from spinning in the wind when it’s on your car’s bike rack.