In 1911, inventor Frank P. Snow invented this “hat guard” to inflict a painful punishment on any creep with the gall to steal a chapeau belonging to another gentleman. From Weird Universe:

A thief could take the hat, but if he tried to put it on, a “guarding prong” would jab into his skull. The prong locked in place and could only be moved if you knew the code to the combination lock.

from Boing Boing