Codeblock.js is a basic coding demo (playground, sandbox) system that can be used to execute dynamic code on demand.
The developer can load preset code with the page and allow the user to execute it, or he can let the user add his own and execute that as well.
For pre-loaded code there's a "reset" button in the top right corner of the editor which will reset any user modifications.
A demo is included with the Codeblock.js download package. Requirements: