There's so many code examples that hint at running your code on the terminal prompt, and that hint is a $ character at the start.

I've written about how I run my blog in a way that this character isn't actually part of the content (it's an non-selectable CSS pseudo element), but this doesn't help when taking code from other sites.

Mikkel's tiny, tiny script is so elegant I pinched it right away. The script, called $ consists entirely of:

#!/bin/zsh
$@

Now whenever I paste a line starting with $ ... the command runs as I would intend. Perfect!

Source: github.com