Snipt.org provides a new solution for this. Just copy and paste your code into Snipt, tell it what programming language it is in, and Snipt will give you a short URL for your code snippet to hand out on Twitter. The developers want you to think of it as "twitpic, but for code and long text," though it is really a lot more flexible than that.Sending a piece of source code for troubleshooting to one of your friends or colleagues can be a hassle.
Besides giving you a short URL, the most important feature of Snipt.org is that it preserves the formatting of your code and also colors it according to your specified programming language for easier reading. Snipt.org understands over 125 different programming and scripting languages, ranging from C++ and Perl, to LaTeX and Python.
Overall, this looks like a very versatile tools for programmers and everybody else who wants to easily share short snippets of code.
snipt.net, which is not related to snipt.org at all (at least as far as we can tell), and which focuses on creating a repository of code snippets. Snipt.net does not feature any Twitter integration, though, according to the snipt.net team's latest Twitter updates, they are thinking about this.Of course, there is also