Basic usage is simply ./pastebin.py file, or pipe into stdin with somecmd | ./pastebin.py. See ./pastebin.py -h for details of options.
If you want to paste to a user account without having to supply your username and password each time, you can use ./pastebin.py -k to retrieve your API key and add it to the definition at the top of the file. Subsequent pastes set to login will not require the username and password.
The autodetection of formatting can also be edited at the top of the file, either to add new filetypes or change the formatting (e.g. use cpp-qt for .cpp files, or non-Rails Ruby). Defaults are based on Pastebin's list of common formats.
Note: Your pastes may still be caught by the spam filter if they include URLs. Visiting the returned URL will give you a captcha to complete in this case.