The driver of the work truck in this photo (original source unknown) became annoyed by reckless drivers following him too closely. He came up with this hack to get them to back off:
It's clever, appealing to the tailgaters' selfishness to get them to behave appropriately, assuming they can see it.
The trick has been picked up on Reddit, where others are emulating itf. This guy's set-up has even better visual contrast, though I think the zip-tie approach presents a theft opportunity:
There is a long video here of a guy who has taken the trouble to rig up a device that sprays fluid out of the back of his Jeep at the push of a button. I won't embed it because it's pretty dumb. He actually drilled through the back of his own tailgate to do this. I think it's a terrible idea and stands a good chance of escalating the incident—which he has also considered, as he recommends carrying wasp spray to ward off anyone approaching the car.
I think the wrench approach is obviously the better one; it's passive and unlikely to end in conflict.