A person who, in the presence of any court, assaults or threatens to assault another, or to commit an offense against his property, or who contends with another with angry words to the disturbance of the peace may be ordered by the court without warrant or other proof to give security to keep the peace in an amount not exceeding two thousand dollars.