News for hackers. Stuff that matters.
Re:Alias.sh: for finding, sharing and storing bash aliases by l-p on Monday January 14, 2013 @08:23AM (#5054495)
Top two are wrong… Not a good thing. It's always the same badly written snippets that get copy-pasted across websites without anyone really understanding what it does (hence the copy/paste).

> alias servethis="python -c 'import SimpleHTTPServer; SimpleHTTPServer.test()'"

    python -m SimpleHTTPServer # python 3
    python -m http.server # Python 3

> extract () { /* useless stuff */ }

   tar xf
Re:Alias.sh: for finding, sharing and storing bash aliases by benjy1 on Monday January 14, 2013 @08:34AM (#5054524)
We only launched this morning so they're all very new. We do have a voting feature on the full page view so we're hoping the poorer aliases sink over time. We also intend to make the voting more prominent.
Re:Alias.sh: for finding, sharing and storing bash aliases by Despite on Tuesday January 15, 2013 @03:11AM (#5059248)
There are versions of tar (that I have to use) which don't autodetect the compression type. And that alias includes non-tar filetypes.
Re:Alias.sh: for finding, sharing and storing bash aliases by dschep on Monday January 14, 2013 @08:40AM (#5054557)
I think you mean Python 2 for the SimpleHTTPServer example.
Re:Alias.sh: for finding, sharing and storing bash aliases by benjy1 on Monday January 14, 2013 @11:55PM (#5058713)
python one works fine for me. I tried tar xf on a zip file and it didn't work?
Re:Alias.sh: for finding, sharing and storing bash aliases by qu4z-2 on Tuesday January 15, 2013 @01:09AM (#5058977)
tar xf doesn't work on zip, rar, 7z, or plain compressed files (ie log.gz instead of log.tar.gz)

Additionally I prefer "verb noun" form over "program noun", so I like extract. I already alias open=xdg-open (so I can type "open somefile.pdf" or "open somefile.doc", etc)