Just so you know, I'm a designer and don't know how coders presents their code but I do hire coders and my suggestion is from a client's point of view who doesn't know all the terms. So this is a suggestion on how to present your work in a visual way.
Maybe you could create animated gif or flash or insert animation type here to showcase what the code does. Showing the code would mean something to people who know about it but for people (like me), some kind of visual demo would be very helpful. There's many software to do that kind of things. Maybe someone will post suggestions, a lot of designers post nice little animations to show their how-to.
It could be a bit like this link (too big to insert, click to watch). Even if the real interface didn't look good, you can create one you like; a fake interface that shows you code used in ideal conditions. And you can also explain what it does... but that part I would add it as a little paragraph in text, and you should also vulgarize your explanation or at least have an explanation for mere-mortals-who-aren't-coders-but-might-still-be-your-client-one-day. One part with your jargon and one part vulgarized.
And below the fake interface, you could add your code. It could even be scrolling automatically. The image below is just an example but you could simply post it as normal html text.