Live data from Hacker News

Ooops.

github.com

131–140 of 247 posts

Re: Ooops.

#131
post #82

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.

Use the Dummy switch: http://sql-info.de/mysql/notes/I-am-a-dummy.html

Sweet! Just "alias mysql='mysql --i-am-a-dummy'" in /etc/profile and never make mistakes again!

Re: Ooops.

#132
post #119

Earlier quoted context omitted.

You don't want to have to depend on the user to clean up after your automation. I don't see what's the big deal is. Once in a while when the recycling bin gets too big, the user can empty it. Or you can have a scheduled operation that deletes stuff after 30 days.

> Once in a while when the recycling bin gets too big, the user can empty it. Many Linux systems don't even have a regular "user". They just sit in a corner and serve webpages, or do other tasks silently. > Or you can have a scheduled operation that deletes stuff after 30 days. Why not just keep backups for 30 days?

Backups have a latency that a recycle bin doesn't. When I made something two hours ago this is the worst time to unlink it.

Re: Ooops.

#133

Earlier quoted context omitted.

I've been around for much longer than a year, just not with this name.

In that case, you're welcome to submit comments saying that HN is turning into reddit.

I've only been here for almost 2 years (well close enough to 2) however I would say the average HN thread is still more insightful than the average Reddit thread (including filtered sub-Reddits)

Re: Ooops.

#134
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…

Just make sure no one is sadistic enough to follow you around running

    touch -- --

Re: Ooops.

#136

Earlier quoted context omitted.

It's like reading Youtube comments--not for the faint of heart. And the jab at reddit from the HN pedestal is probably misguided... reddit used to be more like HN, and HN is becoming more like the bad parts of reddit every day. Every site tends toward Youtube level comments as time passes, and the people who don't like it eventually jump ship to a new site, and then the process repeats itself.

HN is not at all like the 'bad parts' of Reddit.

[deleted]

Re: Ooops.

#137

Earlier quoted context omitted.

As Windows was probably installed on C it probably didn't do any real damage, did it?

If I remember correctly, that was before Windows started protecting boot volume.

To be more precise, NT had file locking enforced by the OS unlike DOS.

Re: Ooops.

#138
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…

[deleted]

Re: Ooops.

#139

Perhaps because I'm not a GitHub user, and because I've only ever peeked at HNers' GitHub accounts, but I was always under the impression that given the nature of the service, it would have an early-days-of-HN feel wrt to user behaviour. It was a little disheartening to see the number of Reddit-esque comments that are simply a couple of words along the lines of "omfg" and a constant stream of meme abuse. I expected b…

Actually, your comment sounds more like r/programming than anything I've seen on HN lately.

Github comments are usually on-point, because nobody comments on github-hosted projects unless they're actually working on the project.

The exception is when somebody does a funny commit, and it gets circulated through...you guess it, HN, reddit, etc.

Re: Ooops.

#140
Unix could really do with a command that you can wrap around this type of call. Either a sanity check on the path part or a safe rm alternative that contains it. I would gladly give up full rm access to know that I can safely (or safer-ly) delete in scripts.

It could be something as simple as a file with paths on each line it - match one path or a path with a glob - and the script fails before destroying anything important.

Overriding it might involve adding a --override=/path/to/something but at least then it would be very explicit

Post reply on HN