I just wrote this answer and in the last paragraph I decided to create a small utility as part of the answer. The utility is needed for the process. After submitting, I found that Android Enthusiasts doesn't have Stack Snippets enabled, so I ended up leaving the JS utility in the Sandbox and providing a link.
The question is, in such scenarios where I want to provide a coded utility (JavaScript or something else), especially on non-programming-oriented sites, what is a good way to do so?
Some side notes: I didn't think of GitHub (GitHub Gists) this time because
- GitHub Gists don't code to be executed directly, whereas Stack Snippets do
- "Link-only answers can become invalid if the linked page changes." and I believe that Stack Exchange links are in general more reliable than GitHub links.
- While GitHub Pages may be an alternative, there are just too many downsides and instability