commandlinefu.com is the place to record those command-line gems that you return to again and again.
Delete that bloated snippets file you've been using and share your personal repository with the world. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/
You can sign-in using OpenID credentials, or register a traditional username and password.
First-time OpenID users will be automatically assigned a username which can be changed after signing in.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for:
. a Ruby SSH helper script
. reads a JSON config file to read host, FQDN, user, port, tunnel options
. changes OSX Terminal profiles based on host 'type'
USAGE:
put 'ash' ruby script in your PATH
modify and copy ashrc-dist to ~/.ashrc
configure OSX Terminal profiles, such as "webserver", "development", etc
run "ash myhostname" and away you go!
v.2 will re-attach to a 'screen' named in your ~/.ashrc
Commandline perl filter for, using a production.log from a rails app, display on realtime the count of requests grouped by "seconds to complete" (gross round, but fair enough for an oneliner) :)
"-n" loops around ; "-e" executes the given quoted string ; "$_" is the current line ; "split" creates an array on white space; each item of the array is "collected" to be then "capitalized" ; the array is "joined" back into a string.
Ruby version.
Also, a perl version:
perl -e 'printf("%.2x.",rand(255))for(1..5);printf("%.2x\n",rand(255))'
Can be useful to granulary flush files in a CDN after they've been changed in the S3 bucket.