home

useful scripts

tags: code

change swap file

swapoff /swapfile
fallocate -l 1G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile

yt playlist markdown links

const links = []

for (const el of document.querySelectorAll("a#video-title")) {
    links.push(`[${el.textContent.trim()}](${el.href})`)
}

console.log(links.join('  \n'))