Molly Guard

(bookofjoe2.blogspot.com)

42 points | by surprisetalk 14 hours ago

8 comments

  • JoshTriplett 12 minutes ago
    There's a great piece of software called "molly-guard", which intercepts calls to "poweroff" and "reboot" and similar. It checks if it's being invoked via an SSH session, and if so, it asks you to type the name of the system you're shutting down. That way, you never accidentally shut down a remote server when you meant to shut down your own system (or a different server).
  • evanjrowley 1 hour ago
    I'm reminded of this legendary HN comment: https://news.ycombinator.com/item?id=16530398
    • cortesoft 49 minutes ago
      I am confused by the second guy who was curious and punched the plastic lid… it says you have to hold the button down for 30 seconds, how did that happen?
      • charles_f 43 minutes ago
        The guard itself ends up pushing the button
  • itayd 11 minutes ago
    best molly-guard depicited in "The Good Place": https://www.youtube.com/watch?v=etJ6RmMPGko
  • jiehong 2 hours ago
    Oh! Then perhaps the long press required for the iPhone’s action button to trigger is a Molly guard!

    Also, perhaps `rm` should be molly guarded to move things to the trash on all systems by default, and delete only if forced to by a flag.

    Note: I’d have expected Molly to be a cat, because they tend to be pretty good at disrupting things in my experience.

    • yjftsjthsd-h 21 minutes ago
      > Also, perhaps `rm` should be molly guarded to move things to the trash on all systems by default, and delete only if forced to by a flag.

      Not all systems, but some (RHEL, I think?) default alias rm='rm -i', yes

    • Modified3019 1 hour ago
      Seeing long presses implemented for those intermittent and irreversible actions in games is something I‘ve always appreciated. I often end up making errant inputs, especially on keyboards.

      A guard I often make for myself is removing/disabling the delete key on my keyboard, and setting FN+Backspace to Delete with whatever control software is involved. I often then repurpose the delete key location to F2, which is typically used to “Edit” a spreadsheet cell or file name.

    • denkmoon 1 hour ago
      rm has mollyguarding, that's why every invocation of rm you see on the internet is followed by -f
      • yjftsjthsd-h 16 minutes ago
        I think that may be a combination of (IMHO unfortunate) factors:

        * Yes, on some systems rm is aliased to rm -i by default.

        * Some scripts will use rm -f because normal rm returns an error if the target already doesn't exist but -f doesn't care.

        * Finally, sometimes files are just ... I think it's being marked read-only that does it? I've hit this while trying to rm a git checkout; you actually do need to add -f sometimes to succeed. So if you just add -f then it'll always work.

  • Shadowmist 1 hour ago
    I've been looking for this!
  • hyperhello 1 hour ago
    “Mollyguarding” sounds like a great derogation of unnecessary safety measures. Stop mollyguarding me!
  • yolosollo 1 hour ago
    The digital equivalent of this for AI agents is something I've been working on. operate.txt has an `irreversible_actions` section: sites declare which actions can't be undone so agents pause and verify with the user first. Same concept as the molly guard. The system flags dangerous operations rather than relying on the operator to remember. github.com/serdem1/operate.txt
    • spongebobstoes 45 minutes ago
      this isn't like a Molly guard. this is like asking the toddler to be careful
  • jiehong 2 hours ago
    I do wish those were a thing on flat touch sensitive induction cooktops! (For all those pesky water droplets causing the cooktop to error out and turning itself off)
    • gib444 41 minutes ago
      I get annoyed even at the thought of those things! Had to use a few while travelling. Ugh!