I have for a while been trying to find good ways of publish small scripts and code snipets, The Web view offered by github.com Seems to be very good and they offer free hosting to open source projects.
However the source control program 'git' is not installed by default. There now appears to be a very good installer offered by google code here.
I had to add a new path to my .bashrc to make it work from the terminal.
$ vim ~/.bashrc
and add these lines in (remember to press i in vim to get to insert mode)
#Add Path for google code install of git (Source control)
And press 'esc : w q return' to save and exit vim.
The github guide also seems very good, although I could not get it to install via macports.