Live data from Hacker News

Ooops.

github.com

81–90 of 247 posts

Re: Ooops.

#82
post #46

I learned a rather unusual trick to keep myself safe from unintended glob matches. It is not "fool"-proof, but it will probably dilute an unmitigated disaster into an incomplete disaster: Keep a file named -i in the sensitive directories. When glob picks it up, which should be fairly early, it will be treated like a command line argument. Has saved me on occasions. I also had a friend in school who used to, for whate…

I hate that feeling you get in the pit of your stomach after you realize what's happening. Same thing when you forget the WHERE on a DELETE FROM.

Use the Dummy switch:

http://sql-info.de/mysql/notes/I-am-a-dummy.html

Re: Ooops.

#83

Earlier quoted context omitted.

I suppose what you're seeing here is actually a reflection of Reddit, 4Chan & friends, i.e. I suppose this very commit has been posted in some of those places as well. I still have some hope for Github-in-general.

Actually, almost all of the comments are since it got posted here, and as of right now this second, I don't see it's popular on Reddit...

HN is mirrored on tons of sites. The fact that it's the default on somewhere like jimmyr.com for 'coding' should tell you how well-known news.yc has become. Don't think it's full of erudite hackers only anymore.

Re: Ooops.

#84
post #46

I learned a rather unusual trick to keep myself safe from unintended glob matches. It is not "fool"-proof, but it will probably dilute an unmitigated disaster into an incomplete disaster: Keep a file named -i in the sensitive directories. When glob picks it up, which should be fairly early, it will be treated like a command line argument. Has saved me on occasions. I also had a friend in school who used to, for whate…

I hate that feeling you get in the pit of your stomach after you realize what's happening. Same thing when you forget the WHERE on a DELETE FROM.

Over the years I've been steadily training myself to type "WHERE" earlier in the process, until I have finally settled on the obvious-in-hindsight solution: Always simply start with the WHERE clause.

(Of course every effort not to be on the SQL shell of a production server in the first place should be taken, but sometimes you need a sledgehammer and nothing else will work.)

Re: Ooops.

#85
post #84

Earlier quoted context omitted.

I hate that feeling you get in the pit of your stomach after you realize what's happening. Same thing when you forget the WHERE on a DELETE FROM.

Over the years I've been steadily training myself to type "WHERE" earlier in the process, until I have finally settled on the obvious-in-hindsight solution: Always simply start with the WHERE clause. (Of course every effort not to be on the SQL shell of a production server in the first place should be taken, but sometimes you need a sledgehammer and nothing else will work.)

I do that now, too. I have a trigger-happy semicolon finger.

Re: Ooops.

#86

Earlier quoted context omitted.

rmtrash http://www.nightproductions.net/cli.htm I prefer 'brew install rmtrash'

There's lots of stuff like that out there, I'm talking about something I can actually replace the rm binary with, a wrapper that precisely maintains the rm interface as described here: http://developer.apple.com/library/mac/#documentation/Darwin... I like the idea of actually wrapping the unlink syscall, but I have no idea if/how darwin allows that.

You can alias trash-cli over rm, though it ignores -i, -r and -f and instead runs recursively, forced and non-interactively by default.

Re: Ooops.

#87

This release fixes the install script; it no longer deletes the /usr directory in its entirety. But how on earth did this get through even basic testing? Absolutely shocking!

Not really that shocking if you realize it's a mostly one man project that probably doesn't have basic testing.

Re: Ooops.

#89
post #79

Is there a good reason why Linux doesn't have a recycle bin?

because real Operating systems don't need one?

That's what I thought. I'd be happy if anyone chimed in with a legitimate reason, but I won't be surprised if the lack of a recycling bin is just one more symptom of the Linux developer community's apathy towards the actual human beings who use their software.

Re: Ooops.

#90
post #79

Is there a good reason why Linux doesn't have a recycle bin?

Almost all of the desktop environments commonly used with Linux do have a trash bin.

If it wasn't obvious, "Why is `rm -rf` not connected to the recycle bin?" is implicit in my original question.
Post reply on HN