An agitated North East man has shouted "shame on you" at a judge and labelled a decision to dismiss his appeal against a drug test refusal and phone offence a "joke".