I’m a really big fan of [Alfred](http://alfredapp.com/), and lately I’ve found it really useful for running tiny little snippets of code — whether it’s to quickly URL decode a string, or remind myself of how C integer-to-float conversion behaves, I find myself using these little extensions I put together quite frequently.
Here’re two workflows I use to run PHP code (one which just executes it and shows the result in Growl, and one which copies the result to the clipboard), and a workflow that runs a snippet of C code. Of course, it wouldn’t take much to make workflows for many other languages, too.
Alfred 2 workflows
Now with live results! Hit enter to copy result to clipboard.
Older, Alfred 1 extensions:
Execute PHP Code.alfredextension