I usually do the "on you left" followed by "hello" with cyclists. with other folks, I'll try and get their attention and play it by ear and eye.
I never have quite figuered out the "blow by you with 2 inches to spare" routine. I cases where I think it's unsafe to pass, I'll ease up and pass later on. It's like passing someone when driving a car.