Looking for advice....

A woman on a recent century ride had her cable housing come out of where it connects to her handle bars. (Sorry, I don't know the proper terms for those gear junkies out there...) She was able to put her bike on a fixed gear and ride it into a repair station on the ride, however, what if one were out on a solo long ride and such a thing happened? Any advice of books or resources for MacGuyver fixes?