High beams, extra lights, lateral motion while you're still far enough back for it to be safe, blasting the horn etc... All of these things might have helped to avoid that situation. Kudos to the rider for being alert and knowing how to use the brakes though.
I've tried the lateral motion thing for oncoming traffic, it doesn't seem to make much difference. Maybe I'm not doing it right? It freaks out tailgaters though and makes them back right off.