How to Handle Browser Clipboard in JS

The other day I wanted to be able to copy/paste files to an HTML textarea. like in Github or GitLab. Since I’m not a frontend expert I quickly browsed to MDN. <textarea id="mytextarea"></textarea> const myTextArea = document.querySelector("#mytextarea") myTextArea.addEventListener("paste", (e) => { let paste = (event.clipboardData || window.clipboardData).files; console.log(paste) }) Even if you didn’t read the doc, you might think that if you paste some text, the files element would be empty....

December 15, 2022 · 2 min · 260 words · Rémi Desgrange

Why I Love Vuejs

Background I’m a backend developer. I went to embedded software dev, that all the industry are now calling “IoT”, because it is much more cooler, to SysAdmin, now called DevOps, to backend developper. I never learned frontend dev, I always use all the possible helper builds to help me not do it. But really don’t like this way of using wrapper blindly and not understand what you do and copy paste StackOverflow stuff into my code....

April 11, 2020 · 3 min · 583 words · Rémi Desgrange

My Python Setup

The Python programming language is, I think, a fantastic tool. But there is two fucking thing that really makes me sad: packaging and dependency management. Today, my Linux distribution, Arch, decide that it was OK to migrate python 3.8. And it broke tons of shit on my machine. So I took a moment to re-install and harden stuff so that it doesn’t happen again. Pyenv To Have Multiple Version I use Pyenv with the plugin to handle virtualenv....

November 18, 2019 · 2 min · 228 words · Rémi Desgrange