A public gist can be almost anything.
A simple example of a Javascript function:
function randomInt(min, max) { return Math.floor((max - min + 1) * Math.random()) + min; }