🧗♂️
- 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]);
- Create a new bookmark.
- Set the bookmarklet name and paste the above as the URL.
- 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);
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"New Snippet": { | |
"prefix": "New Snippet", | |
"body": [ | |
"\"$1\": {", | |
"\t\"scope\": \"$2\",", | |
"\t\"prefix\": \"$3\",", | |
"\t\"body\": [\"$4\"],", | |
"\t\"description\": \"$5\"", | |
"}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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("# ")) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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\""], |
OlderNewer