Optional - Set format on save and any global prettier options
npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
// Types for the result object with discriminated union | |
type Success<T> = { | |
data: T; | |
error: null; | |
}; | |
type Failure<E> = { | |
data: null; | |
error: E; | |
}; |
{ | |
"Console Log": { | |
"prefix": "cl", | |
"body": "console.log($1);", | |
"description": "Console Log" | |
}, | |
"Named Function": { | |
"prefix": "nfn", | |
"body": ["function ${1:functionName}($2) {", " $3", "}"], | |
"description": "Named Function" |
let likes = 0; | |
setInterval(() => { | |
const heart = document.querySelector('svg[aria-label="Like"][width="24"]'); | |
const arrow = document.querySelector('svg[aria-label="Next"]'); | |
if (heart) { | |
heart.parentNode.parentElement.click() | |
likes++; | |
console.log(`You've liked ${likes} post(s)`); | |
} | |
arrow.parentElement.parentElement.click(); |
#!/bin/bash | |
echo "*** SVG 2 ICNS ***" | |
if [ $# -ne 1 ]; then | |
echo "Usage: svg2icns filename.svg" | |
exit 100 | |
fi | |
filename="$1" | |
name=${filename%.*} | |
ext=${filename##*.} | |
echo "processing: $name" |
# This hosts file is brought to you by Dan Pollock and can be found at | |
# http://someonewhocares.org/hosts/ | |
# You are free to copy and distribute this file for non-commercial uses, | |
# as long the original URL and attribution is included. | |
#<localhost> | |
127.0.0.1 localhost | |
127.0.0.1 localhost.localdomain | |
255.255.255.255 broadcasthost | |
::1 localhost |