commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Finds the line number matching the regex, then passes that to BC for some math, passes that to head, and uses tail to trim off the unwanted section at the top. The whole thing is spit out to a script that can then be shared or run. Comes in handy for reading select sections from error logs.
I have this saved as jsonlint chmodded +x and file.js is instead $1, but YMMV
replace username, password, and nameofnewfriend with proper values. Remember to escape things like ! or & in your password