OK firstly, I agree with what everyone else here has said, and I definitely
do not recommend using this approach unless you are a veteran, have already gained the respect of coaches and your peers, and know how the coach will handle it.
Having added that disclaimer, one of my favourites for the coach who is yelling all game is after the break between quarters, but before the players are ready to play, go and sit on the bench near the coach. Chances are he will ask you what the hell you are doing, and the response is:
Well coach, you obviously have a much better view from here than I do on the court, so I'm going to run the game from here. Just to make things even, my partner will sit on the other bench. Any problems with that?
Another variation is to suggest to the coach that if he (or she) agrees to stop telling you how to referee, you won't start making coaching decisions for them.
A partner of mine once called a substitution for a coach, and when the coach asked what was going on he said that as the coach wanted to referee, the referee thought he should coach.
As I said above, using any methods like these depends a lot on your personality, the personality of the coach, your experience and many other factors.
But it can be a lot of fun