Why Nostr? What is Njump?
2023-10-21 02:14:58

shikanoko nokonoko on Nostr: Emacs trick of the day: M-x flush-lines M-x flush-lines prompts for a regex and ...

Emacs trick of the day: M-x flush-lines

M-x flush-lines prompts for a regex and removes all lines from the buffer matching the given regex.

Just now I rebuilt a hetzner VPS which of course means I get the infamous

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

message when I try SSHing back in.

To remove the needed lines from ~/.ssh/known_hosts I simply run M-x flush-lines in the buffer and they're all gone.

Pretty neat :)
Author Public Key
npub1x2cqsfzs6gnfluzz48922n23xazeumhsaukq02v934dk2dydwaustwq9hv