Text License is a module for the Drupal CMS that allows the assignment of a license to published content. Many licenses intended for text documents are supported. It is possible to limit the available licenses on a per node type basis, set default licenses globally and per node type, assign permissions to users so they can override the default licenses, etc.
YesPaste! is a pastebin application written with Ruby On Rails. It allows you to add a comment to the paste, and allows user comments. Comments can be formatted with BBCode syntax (with [code][/code] possibilities). CodeRay is used for code highlighting. It also permit paste editing.