Skip to content

Instantly share code, notes, and snippets.

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

Eyssette eyssette

🧗‍♂️
View GitHub Profile
@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 / 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 / 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 / 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 / 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 / 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\""],