As for what constitutes a large excerpt, it's difficult to say. Certainly, if you're quoting an entire php/css/js file, put it on pastebin. For anything under 100 lines, we ask you use your best judgement. Do consider that you're asking people for free support, and it's much easier to read a pastebin/gist than a styled block of 150 lines of multi-indented code. Scrolling back and forth, as well as up and down, trying to unpick code via a cramped code box is a time-consuming activity that distracts from answering the actual questions.
Note: Anything you put in a forum topic or a pastebin is public. Anybody can see it. Don't post any passwords or private info there.