one of my favorites is querying dns to get wiki excerpts
dig +short txt bmw.wp.dg.cx
"(BMW), is an independent German automobile manufacturing company founded in 1916. It also produces motorcycles, is the owner of the MINI brand and is the parent company of Rolls-Royce Motor Cars. http://en.wikipedia.org/wiki/BMW"
I am frequently amazed to see professional software developers with years of experience in the field, who only type using their two index fingers. You probably do not need to type 120 WPM to be an amazing programmer, but typing without looking at the keyboard is absolutely essential.
> With the following command we test google with 20 concurrent connections for 30 seconds
Even though this is Google and they probably don't have a problem with this, I don't think you should benchmark servers that don't belong to you. It's not nice and could be mistaken for a DOS attack.
Google may actually give you a short-term IP ban (a day or so), so spamming their servers with spurious connections may not be in your best interest -- doubly so if you're at a workplace.
Yesterday I used the ipfw command to run our product in "slow motion" to spot loading order and if animations started at the right places. Discovered alot of stuff that needs fixing. The ipfw command is for trottling bandwidth, and great for product designers like myself :) I'm sure it has other uses as well.
OS X has a useful Network Link Conditioner utility. It has built-in profiles such as lossy 3G connection, average wifi connection, good wifi connection etc.
$ curl -I news.ycombinator.com
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Cache-Control: private
Connection: close
Keep in mind that this will fire a HEAD request to the server which, depending on web server you use in development, may not return the exact header you'd get with GET (IIRC, Jetty used to do this).
I like to use something like this in such situation:
I rarely find I use curl's -s without its -S, e.g. -sS. It seems curl's design is flawed in its definition of -s; perhaps it's historic and it was too late to change it.
Among (too) many other things, the OpenSSL "openssl" command does Base64 en/decoding, calculates MD5 and SHA* hashes, creates, displays, converts, and verifies certificates, certificate chains, and CRLs, and even works as a convenient "micro-CA" for testing purposes.
If you're getting started with the command line, you might find helpful an entire series on Quick Left's blog for beginners and experienced devs alike: http://quickleft.com/blog/tag/command-line
Cheers for that, will come in handy very soon. For those wondering
Deliver a standard test email, requiring CRAM-MD5 authentication as user [email protected]. An "X-Test" header will be added to the email body. The authentication password will be prompted for.
[+] [-] zalew|13 years ago|reply
one of my favorites is querying dns to get wiki excerpts
http://www.commandlinefu.com/commands/view/2829/query-wikipe...[+] [-] morsch|13 years ago|reply
[+] [-] benjaminwootton|13 years ago|reply
A little bit of shell scripting goes a long way in automating away dev work.
[+] [-] Derbasti|13 years ago|reply
I am frequently amazed to see professional software developers with years of experience in the field, who only type using their two index fingers. You probably do not need to type 120 WPM to be an amazing programmer, but typing without looking at the keyboard is absolutely essential.
[+] [-] zobzu|13 years ago|reply
Rare are the ones who know how to use these basic commandline tools.
The last time I've shown ngrep to a sysadmin he was like "omagad amazing" - always feels nice :)
But, that's not really an obscure tool. I initially thought everyone knew that, like most know nmap.
Turns out most know nmap and ssh because they're really that well known (generally they don't know most options)
Makes me sad! Command's line easy and fun!
[+] [-] mjwalshe|13 years ago|reply
[deleted]
[+] [-] lordlarm|13 years ago|reply
> python -m SimpleHTTPServer
[+] [-] dudus|13 years ago|reply
[+] [-] bgaluszka|13 years ago|reply
> php -S localhost:8080
[+] [-] axitanull|13 years ago|reply
> python -m SimpleHTTPServer 5000
[+] [-] agumonkey|13 years ago|reply
[+] [-] simfoo|13 years ago|reply
Even though this is Google and they probably don't have a problem with this, I don't think you should benchmark servers that don't belong to you. It's not nice and could be mistaken for a DOS attack.
[+] [-] ihsw|13 years ago|reply
[+] [-] jameswyse|13 years ago|reply
$ http GET http://yourmom.ca/
[+] [-] secoif|13 years ago|reply
[+] [-] apawloski|13 years ago|reply
[+] [-] lovskogen|13 years ago|reply
[+] [-] rada|13 years ago|reply
[+] [-] sirn|13 years ago|reply
I like to use something like this in such situation:
[+] [-] k33l0r|13 years ago|reply
[+] [-] ralph|13 years ago|reply
[+] [-] jasomill|13 years ago|reply
[+] [-] coderholic|13 years ago|reply
[+] [-] bazzargh|13 years ago|reply
[+] [-] jessicard|13 years ago|reply
[+] [-] ibotty|13 years ago|reply
[+] [-] moreati|13 years ago|reply
Deliver a standard test email, requiring CRAM-MD5 authentication as user [email protected]. An "X-Test" header will be added to the email body. The authentication password will be prompted for.
http://linux.die.net/man/1/swaks[+] [-] unknown|13 years ago|reply
[deleted]
[+] [-] justincormack|13 years ago|reply
[+] [-] patrickod|13 years ago|reply
[+] [-] kooshball|13 years ago|reply
echo '{"foo": "lorem", "bar": "ipsum"}' | python -mjson.tool
[+] [-] easternmonk|13 years ago|reply
[+] [-] fsaintjacques|13 years ago|reply