57

Following on from this Meta TeX SE question, how about offering an SE-branded pastebin for posting long files? The problem with using things like pastebin is that files get deleted after some time. Since the idea of these sites is to build a repository of questions and answers, it's no good for our answers rely on broken links.

Ideally, "SE pastebin" would have the following features:

  • Items not linked to by questions/answers on any SE site would be deleted.
  • Users would be able to control when files expire (e.g. if you're posting output from dmesg or the like, that can expire when you accept a solution, but if the text is, say, code used in the answer, then that should never expire).
  • Users should be able to specify syntax highlighting.
8
  • This is a brilliant idea. Nov 12, 2010 at 11:26
  • 3
    Nice idea. Maybe license / rent / buy a good existing implementation, like they did with Imgur for inline images?
    – Pekka
    Nov 12, 2010 at 11:31
  • I like this, would be great for "oneboxing" in chat and, if it were integrated with WMD (like Imgur), it just might solve those rough syntax highlighting issues.
    – Andy E
    Nov 12, 2010 at 12:34
  • 3
    Expiration is a bad idea. Why remove context from a question/answer?
    – badp
    Nov 12, 2010 at 12:40
  • 1
    We'd have to encourage people to include the relevant lines of the dmesg output in their answer: the rest of the file is irrelevant. I guess hosting text is so cheap nowadays that there's no cost issue in keeping it around forever... (that was what motivated the ideas about expiration)
    – Seamus
    Nov 12, 2010 at 13:27
  • 3
    Silly question perhaps, but what is "oneboxed"?
    – Cylindric
    May 2, 2012 at 10:00
  • 2
    I really discourage the use of externale (pastebin-like) sites as they tend to break over time. Questions / answers / effort is renderd useless due to external sites rearranging their content. I think it is time for paste.stackexchange.com
    – jippie
    Jun 14, 2012 at 11:50
  • 3
    This should happen automatically when code pasted in an answer/question exceeds a certain size.
    – Kylar
    Apr 3, 2013 at 15:40

1 Answer 1

21

There's already something matching what you're looking for: Github Gist.

  • They are already oneboxed in chat.
  • They make a real git repository for each post.
  • They allow editing posts (which translates to a git commit behind the scenes).
  • They allow anonymous posting.
  • They do syntax highlighting.
  • They allow multiple files.
  • They allow comments with Markdown syntax.

Here's a complex example.

7
  • 2
    I don't know how you went from "they are oneboxed in chat" to "the team has chosen a pastebin service". xkcd is oneboxed in chat too; does that make it the official comic chosen by the team? Gist is only oneboxed because somebody requested it Nov 12, 2010 at 16:13
  • @Mrozek The asker wanted the team to implement a pastebin service that is oneboxed in chat, does syntax highlighting, is SE-only and has expiry options. I think "SE-only" is unnecessary and expiry options are plain bad here. The remainder has already been implemented by the team.
    – badp
    Nov 12, 2010 at 16:18
  • 6
    SO has no particular position on this; the onebox support for gist was added due to popular request, and was not specifically intended to act as a pastebin service. If that had been our intent, we would probably have just enabled pretty-print on code blocks. Nov 20, 2010 at 2:04
  • @Marc: okay, rephrased.
    – badp
    Nov 20, 2010 at 10:53
  • +1 @badp for showing me gist.github.com Apr 13, 2012 at 15:41
  • 3
    @MichaelMrozek If SO did have an official comic, it surely would be xkcd?
    – Seamus
    Jun 14, 2012 at 11:53
  • Just a note - that example in the post contains images; apparently to add images, you'd have to clone, commit and push back (see here) - and it won't let you push back to the gist via git unless you pass github login auth (and unfortunately they don't accept OpenID); and once your anonymous gist is created on the web, you cannot edit it anonymously from the web either. I was otherwise overjoyed to hear (for the first time here) that gists are anonymous...
    – sdaau
    Jun 4, 2013 at 21:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .