Skip to content

Instantly share code, notes, and snippets.

@Windows81
Last active April 27, 2023 04:47
Show Gist options
  • Save Windows81/fa3561ab678ba49d68a52fb569c5cfe7 to your computer and use it in GitHub Desktop.
Save Windows81/fa3561ab678ba49d68a52fb569c5cfe7 to your computer and use it in GitHub Desktop.
Run this on a GitHub code page to retrieve a list of cURL command lines to download raw files.
console.log(Array.from(document.querySelectorAll('.Link--primary')).map(v=>
`curl -s -L ${v.href.replace(/(github\.com\/.+\/.+\/)blob/i,'$1raw')} -o ${v.innerText}\n`
).join(''))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment