A long time ago in Germany (in the Bavarian region), people believed evil spirits and witches went about causing mischief on Thursday nights during Advent.
Children would dress in costumes and walk through the streets banging lids, clanging cowbells, rattling tin cans, and making noise in general. They would also throw peas or lentils at the windows. They would knock on doors, recite a poem, and get a treat from the residents. Some people affix a pitchfork to their gates and hand food and treats for the children. Some people quickly open the door and throw the treat out and run away.
image by 4028mdk09, Wikimedia.org