A thug who carried out two “disgusting and degrading” attacks on police officers after allegedly writing off his grandmother’s car has been jailed.