Live data from Hacker News

Don't touch my clipboard

alexanderell.is

181–190 of 322 posts

Re: Don't touch my clipboard

#182

Just want to share that there's also good reasons for employing this technique. Eg if you select text in Slack that has emojis or formatting, it tries to put plain-text into the clipboard that would produce said emojis and formatting when pasted back into Slack. This is great, and every chat app does does formatted stuff should do this. I'd hate it if browser vendors would attempt to block this and as a result, break…

Except that your example is only “great” because Slack is reimplementing text input- another thing that maybe should just be handled by the system. Is it great that Slack also has its own autocorrect and doesn’t know about the system autocorrect?

> Except that your example is only “great” because Slack is reimplementing text input- another thing that maybe should just be handled by the system.

But this won't allow you to have a consistent emoji across platforms, neither do server-specific emoji. Besides, I found typing :emojiname: is much easier than finding emoji in emoji keyboard.

Re: Don't touch my clipboard

#183

The wrongest thing about this, from my perspective, is that my browser fires off a js 'copy' event when I press control-c. There are times when I've found it helpful that a browser can copy text to my clipboard when I click a button, but I can't think of a single time when I want a site to react to my attempt to copy text off if it. Is there any way to configure my user agent (Firefox) not to do this? A hack is ok.

Use reader mode, no JS is active there, and you can copy the code quite nicely. I always do this when I see this behaviour

Re: Don't touch my clipboard

#184
post #50

This happened to me recently and it was pretty embarassing - I copied a two paragraph snippet from a psychology paper and the website put an ad for CBD oil in my clipboard above the paragraphs. The segment I copied was just long enough that it overflowed my chat window so I had no idea the insertion was even there and I sent it as-is. The recipient called me about two minutes later and said "hey, I think you've been…

Use Firefox, go to reader mode, copy/pasta whatever you want without worries

Re: Don't touch my clipboard

#185

Earlier quoted context omitted.

When I learned about this command 10 years ago I tried it on a Debian system that I had no use of anymore. There's a big warning before it lets you execute the command.

That's true only of distributions that alias rm with rm -i. Now, almost 20 years ago only RedHat did it. And it felt wrong to me :-/

Modern versions of rm require you to pass --no-preserve-root. According to Wikipedia [1] this has been the default (in upstream) since 2006. Of course it took distros some time to actually update to the GNU utils 6.4 (especially long-term support systems like CentOS) but it's been a decade since the change should've been implemented everywhere.

[1]: https://en.wikipedia.org/wiki/Rm_%28Unix%29#Protection_of_th...

Re: Don't touch my clipboard

#186
post #51

It's not just a browser thing. Apple Books does this with their e-books, which is infuriating if you're working with a coding book and just want to copy-paste stuff into your editor/terminal. You get something like: “ghci> putStrLn (pretty 10 value)” Excerpt From: Bryan O’Sullivan, John Goerzen, and Donald Bruce Stewart. “Real World Haskell.” Apple Books. When you only copied: ghci> putStrLn (pretty 10 value) Note th…

I solved the Apple Books problem with an automator script, using the "Copy to Clipboard" action. Then it can be assigned a shortcut in Keyboard preferences. https://imgur.com/a/sG2isap

Re: Don't touch my clipboard

#187

Earlier quoted context omitted.

That's true only of distributions that alias rm with rm -i. Now, almost 20 years ago only RedHat did it. And it felt wrong to me :-/

Modern versions of rm require you to pass --no-preserve-root. According to Wikipedia [1] this has been the default (in upstream) since 2006. Of course it took distros some time to actually update to the GNU utils 6.4 (especially long-term support systems like CentOS) but it's been a decade since the change should've been implemented everywhere. [1]: https://en.wikipedia.org/wiki/Rm_%28Unix%29#Protection_of_th...

worth noting that it can be trivially workarounded by adding an asterisk at the end: `rm -rf /*` still works.

Re: Don't touch my clipboard

#188
post #42

The wrongest thing about this, from my perspective, is that my browser fires off a js 'copy' event when I press control-c. There are times when I've found it helpful that a browser can copy text to my clipboard when I click a button, but I can't think of a single time when I want a site to react to my attempt to copy text off if it. Is there any way to configure my user agent (Firefox) not to do this? A hack is ok.

You can turn off JavaScript. This has the added benefit of disabling most tracking and advertising.

Protip: in Safari you can assign a keyboard shortcut to toggle javascript (Preferences -> Keyboard -> Shortcuts -> App Shortcuts -> [+] -> Application: "Safari" Menu Title: "Disable JavaScript" Shortcut: "Cmd+Shift+J". >90% of websites immediately become massively more pleasant and you can quickly toggle it on when actually needed.

For mobile devices, easiest way is to use two different browsers (one with JS disabled).

Re: Don't touch my clipboard

#189

Earlier quoted context omitted.

Modern versions of rm require you to pass --no-preserve-root. According to Wikipedia [1] this has been the default (in upstream) since 2006. Of course it took distros some time to actually update to the GNU utils 6.4 (especially long-term support systems like CentOS) but it's been a decade since the change should've been implemented everywhere. [1]: https://en.wikipedia.org/wiki/Rm_%28Unix%29#Protection_of_th...

worth noting that it can be trivially workarounded by adding an asterisk at the end: `rm -rf /*` still works.

Fair enough, but on the other hand there's nothing preventing you from just putting --no-preserve-root in the command either. I see the feature as something to prevent accidents, not as a way to secure the rm command.

Re: Don't touch my clipboard

#190
post #93

Earlier quoted context omitted.

I think they are talking a about styled quotes, the kinds that point inward, which a REPL won't interpret as an ASCII quote and will throw some type of Syntax error.

Ok but those are standard, valid characters like any others. Why are they ‘horrid’?

They're horrid because you can't easily type them on a keyboard.
Post reply on HN