Hacker News new | past | comments | ask | show | jobs | submit login
25 Even More Slick Linux Commands (viewtext.org)
70 points by yarapavan on Dec 26, 2010 | hide | past | favorite | 17 comments



I really wish these blogs would stop replacing " with “ and ' with ’.

I know it looks nicer, but it totally breaks the ability to paste into a shell :(


This is a result of WordPress's "texturize" function, which is buried deep within the main core of WP. It changes all the 'normal' punctuation marks with their 'prettier' alternatives, and it has always driven me insane.

Funny story: I had the good fortune to drive Matt Mullenweg to dinner after a WordCamp, and in the car we talked about many things. We got to the topic of typography, which made me lament the fact that I was always frustrated when all these blogs would replace straight quotes with curly quotes and how hard it was to copy/paste them elsewhere. "Oh, yeah," he said. "I wrote that."

At that point I completely forgot who I was escorting, shot Matt a sideways glare and said, "YOOOUUUUUU!!!!!!!"

I was immediately embarrassed, but he took it in stride :)


My speed read deciphered that as "shot Matt and dumped him side highway"...


I can't find the interview, but I think this was actually one of the things that prompted Matt into creating Wordpress (the inability of existing solutions to do decent typography).


They just need to change them back on hilight.


Why were you embarrassed?


#2 can be replaced with a 'tree' command

#3 doesn't work for me on Mac OSX with Bash; the ! is interpreted as the last command. Not sure if this works in other shells

#4 is clever, but I would think if you're doing something that complex that you need to recall time and time again you'd make an alias for it.

#8 is clever. I love AWK. But not sure when I'd ever use this.

The rest were pretty bleh to me. Always looking for new shell kung fu but unfortunately this list did nothing for me.


You need to turn on extended globbing for #3 (shopt -s extglob).


Please change the title to "Slick Linux Commands"

http://ycombinator.com/newsguidelines.html


The list stops partway through the 18th command on Firefox 3.6.13, IE 8, Safari 5.03, Google Chrome 8.0, or Opera 11.00. Use the "Original Link" in yarapavan's comment below to see the rest.


Seems that there's a <title> in the original text where the text stops. Apparently the HTML wasn't escaped on that line.




I use this alias:

    alias http="plackup -MPlack::App::Directory -e 'Plack::App::Directory->new({ root => \$ENV{PWD} })->to_app;'"
Which starts a webserver that serves the current directory over HTTP. You can even pass args like --port 8080 to set the port.

(I most recently used this to git clone some library I wrote while at work. They recently blocked github, so I ssh'd to my home machine from my phone, cd ~/projects, http, and then did "git clone http://snowball2.jrock.us:5000/whatever/.git whatever". Not quite as convenient as github, but better than being stuck with the buggy version at work :)


Also:

  python -m SimpleHTTPServer
or

  python -m SimpleHTTPServer 8000


In Python 3, the module was merged into http.server.

python -m http.server


The password generator can be tweaked slightly to return the first --n-- sequences of --m-- or more alphanumeric characters:

  strings /dev/urandom | grep -o '[[:alnum:]]\{--m--\}' | head -n --n--




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: