Whenever in this Code or in any ordinance of the county any act is prohibited or is declared to be unlawful, or whenever in such Code or ordinance the doing of any act is declared to be unlawful, and no specific penalty is provided therefor, the violation of such provision of this Code or any ordinance shall subject the person committing the violation to a fine not exceeding $1,000.00 and costs or to imprisonment for a term not exceeding 60 days, or to both such fine and imprisonment, any or all of such penalties to be imposed at the discretion of the judge of the magistrate court.