I’ve posted the source of my WordPress blog plugin, Filosofo Comments Preview at the WordPress Plugin Repository. You can see the source or view the wiki.
And if you use Subversion, you can get the latest version from http://svn.wp-plugins.org/filosofo-comments-preview/. For example, on a Linux machine you might type
svn co http://svn.wp-plugins.org/filosofo-comments-preview/