Two men have appeared in court charged with offences linked to a series of attacks on police officers over the weekend.