Copying a rsa public key to clipboard
cat ~/.ssh/id_rsa.pub then you can copy your ssh key
cat ~/.ssh/id_rsa.pub then you can copy your ssh key
It’s the built-in function buffer-file-name that gives you the full path of your file. The best thing to do is to have your emacs window to always show your system-name and the full path of the buffer you’re currently editing : (setq frame-title-format (list (format “%s %%S: %%j ” (system-name)) ‘(buffer-file-name “%f” (dired-directory dired-directory “%b”)))) … Read more
You can use the module called win32clipboard, which is part of pywin32. Here is an example that first sets the clipboard data then gets it: import win32clipboard # set clipboard data win32clipboard.OpenClipboard() win32clipboard.EmptyClipboard() win32clipboard.SetClipboardText(‘testing 123’) win32clipboard.CloseClipboard() # get clipboard data win32clipboard.OpenClipboard() data = win32clipboard.GetClipboardData() win32clipboard.CloseClipboard() print data An important reminder from the documentation: When the … Read more
This requires a secure origin — either HTTPS or localhost (or disabled by running Chrome with a flag). Just like for ServiceWorker, this state is indicated by the presence or absence of the property on the navigator object. https://developers.google.com/web/updates/2018/03/clipboardapi This is noted in the spec with [SecureContext] on the interface: https://w3c.github.io/clipboard-apis/#dom-navigator-clipboard You can check the … Read more
For OS X: function pbcopy(data) { var proc = require(‘child_process’).spawn(‘pbcopy’); proc.stdin.write(data); proc.stdin.end(); } write() can take a buffer or a string. The default encoding for a string will be utf-8.
I use the following instruction: :%y+
Use the new clipboard API, via navigator.clipboard. It can be used like this: With async/await syntax: const text = await navigator.clipboard.readText(); Or with Promise syntax: navigator.clipboard.readText() .then(text => { console.log(‘Pasted content: ‘, text); }) .catch(err => { console.error(‘Failed to read clipboard contents: ‘, err); }); Keep in mind that this will prompt the user with … Read more
I found that even with Edit > Automatically sync pasteboard ticked, the feature didn’t work. However, simply unticking and then reticking this option fixed the feature! Hope it works for someone.
The pbcopy command does this. For example, this puts the output from ls on the clipboard/pasteboard: ls | pbcopy And pbpaste does the reverse, writing to stdout from the clipboard: pbpaste > ls.txt You can use both together to filter content on the clipboard – here’s a rot13: pbpaste | tr ‘a-zA-Z’ ‘n-za-mN-ZA-M’ | pbcopy
I believe these are predefined Firebug console functions – at least that seems to be the case for Firebug. If you try calling window.copy for instance, you’ll get a warning about function not defined, so it’s definitely not a browser function, and cannot be used in normal JavaScript files. The following functions also seems to … Read more