Stay away from assholes.
That's it! Whenever I've followed that advice that was given me as a grad student I've been glad I did, whenever I've not followed this advice I've regretted it. This applies to mentors, big shot collaborators, colleagues and trainees. If they are established and confirmed assholes – stay away, if your asshole-meter is ringing all over the place – stay away. The corollary of this advice, of course is: don't become an asshole yourself.