Skip to content

Instantly share code, notes, and snippets.

View eyssette's full-sized avatar
🧗‍♂️

Eyssette eyssette

🧗‍♂️
View GitHub Profile
@eyssette
eyssette / tasks.json
Last active April 4, 2024 10:18
VSCode task: FTP upload
{
"version": "2.0.0",
"tasks": [
{
"label": "Upload via FTP",
"type": "shell",
"command": "bash",
// Il faut d'abord se connecter en ssh au serveur :
// ssh -p PORT USER@SERVER
"args": ["-c", "lftp sftp://USER:PASSWORD@SERVER:PORT -e \"set ftp:ssl-allow off;set ftp:passive-mode off; debug; put -O /MY/DIRECTORY/${relativeFileDirname} ${file}; quit\""],
@eyssette
eyssette / markdownToCsv.js
Created October 10, 2023 20:04
Une fonction pour convertir du Markdown en CSV
function markdownToCSV(markdown) {
const lines = markdown.split("\n");
const csvRows = [];
const currentTitles = [];
const regex = /^(\d+)\.\s/;
for (const line of lines) {
line = line.replace(/^[\s\t]+/, "");
const match = line.match(/^(#+\s)(.+)/);
if (match && !line.startsWith("# ")) {
@eyssette
eyssette / jsonc.json
Created April 13, 2023 09:43
A VSCode snippet to create a new snippet
{
"New Snippet": {
"prefix": "New Snippet",
"body": [
"\"$1\": {",
"\t\"scope\": \"$2\",",
"\t\"prefix\": \"$3\",",
"\t\"body\": [\"$4\"],",
"\t\"description\": \"$5\"",
"}"
@eyssette
eyssette / Highlight-Common-and-Proper-Nouns.md
Last active January 19, 2023 23:36
A bookmarklet to highlight common and proper nouns on a webpage
  1. Copy the code below:
javascript:(function(){
    var script = document.createElement('script');
    script.src = 'https://cdn.jsdelivr.net/npm/compromise@latest/builds/compromise.min.js';
    document.body.appendChild(script);

    script.onload = function() {
        var textNodes = document.evaluate('//body//text()', document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
@eyssette
eyssette / GetMastodonInfo.md
Last active November 18, 2022 23:34
A bookmarklet to copy Mastodon account info to clipboard
  1. Copy the code below:
javascript:var name=document.querySelector(".account__header__tabs__name").firstChild.firstChild.innerText; var mastodonAccount=document.querySelector(".account__header__tabs__name").firstChild.children[1].innerText; var mastodonURL=mastodonAccount.split('@'); navigator.clipboard.writeText(mastodonAccount+','+name+','+'https://'+mastodonURL[2]+'/@'+mastodonURL[1]);
  1. Create a new bookmark.
  2. Set the bookmarklet name and paste the above as the URL.
@eyssette
eyssette / schémas-méthode.md
Last active September 29, 2022 06:08
Schémas sur la méthode

Méthodologie générale

Trois démarches essentielles

Comment analyser ?

@eyssette
eyssette / toGithubPages.md
Last active October 11, 2022 10:55
A bookmarklet to automatically go to a GitHub Pages site from a repository on Github.com
  1. Copy the code below:
javascript:var url = window.location.href; const regex =/.*\.com\/(.*?)\/(.*)/; ;window.location.href = url.replace(regex,%27https://$1.github.io/$2%27).replace(%27blob/main/%27,%27%27).replace(/\.md$/,%27%27);
  1. Create a new bookmark.
  2. Set the bookmarklet name and paste the above as the URL.
@eyssette
eyssette / snap-windows-Lubuntu-TODO.md
Last active September 22, 2022 15:26
Snap windows - Lubuntu

Edit .config/lxqt/globalkeyshortcuts.conf Remove the lines about the Super Key

[Super_L.33]
Comment=Show/hide main menu
Enabled=true
path=/panel/mainmenu/show_hide
@eyssette
eyssette / ol-custom.css
Created September 18, 2022 20:08
Custom CSS for ol lists
ol {list-style-type:none; font-weight:bold; counter-reset: item;}
ol ol {list-style-type:none;font-weight:normal; font-style:italic}
ol ol ol {list-style-type:none; font-weight:normal; font-style:normal}
ol ol ol ol {list-style-type:none; font-size:0.9em}
ol li:before{content: counter(item, upper-roman) " – "; counter-increment: item;}
ol ol li:before{content: counter(item, upper-alpha) ". ";}
ol ol ol li:before{content: counter(item, decimal) ") ";}
ol ol ol ol li:before{content: counter(item, lower-alpha) "/ ";}
@eyssette
eyssette / arguments-format-texte.md
Last active April 24, 2022 18:51
Arguments en faveur du format texte

Les arguments
en faveur du
format texte

Un format
léger


  • Edition
    plus rapide
    • Pas besoin d'un
      logiciel lourd
    • Utilisation de logiciels
      plus adaptés pour l'édition
      • Éditeur Markdown
      • IDE (Visual Studio Code,
        Sublime Text, Atom …)
      • Vim, Emacs
  • Focalisation sur le fond et pas sur la forme