I found a way to reliably lean my bike against anything without it falling or sliding down the wall/window/telephone pole/etc. I have a strap of velcro that I set one of the brake levers with. With one wheel locked like that the bike won't roll forward/backward and fall.