Like today, soldiers of yesterday stood in formation and were inspected. An officer would pass along the ranks and inspect the cleanliness of the soldier, his uniform, his accoutrements and his weapon.
Well, in the British Army of the Napoleonic era, one soldier was very fond of his drink. So fond, that when he ran out of money, he sold his shoes to pay for his liquid refreshments. Ordered to stand in formation for inspection, he knew his white feet would stand out and draw attention to him. Questions would follow and determine that he had sold his shoes. He could then be lashed as a penalty. Well, our brave hero was no slow thinker. He applied soot to his feet, blackening them for the parade.
It didn't quite work. He was caught. It was memorialized. Nice try anyway.
Vigilantibus et non dormientibus jura subveniunt. Molon Labe!