A couple weeks ago I rode around Crater Lake, a 35 mile ride with over 4500 feet of cumulative elevation gain – the sort of ride you really want functional gears for. 

The night before my rear derailleur cable snapped while I was biking home from work. I was able to make it to the bike shop with minutes to spare before they closed, and bought a replacement cable. Everything worked fine on the ride, but it got me to wondering what I could do if my cable had snapped a bit later and broken mid-ride. 

I'm not sure if this is universal, but on my bike and many I've seen, if the rear derailleur cable snaps, the rear gear will slip down to the smallest-diameter gear (i.e. the highest gear). This would make it almost impossible to climb significant hills and get home. 

Is there any simple fix one can do in the field with just basic tools that would enable you to get home on a broken derailleur, specifically when there are significant climbs that can only be done in a lower gear? Is there some way to force the derailleur to a certain position that you would find most useful, and keep it from slipping down from there?