Skip to content

Instantly share code, notes, and snippets.

View benwinding's full-sized avatar
👨‍💼
The Unix "do one thing well" mantra... is not possible for humans

Ben Winding benwinding

👨‍💼
The Unix "do one thing well" mantra... is not possible for humans
View GitHub Profile
@benwinding
benwinding / get-all-repos.md
Last active July 12, 2021 08:13
JS - Subscribe to all Your Github Repo's
// Run on your repositories page (github.com/$USERNAME/?tab=repositories), while logged in

getRepoId = (repoName) => fetch('https://github.com/benwinding/' + repoName)
    .then(res => res.text())
    .then(resText => {
        const repoId = /content="repository\:([0-9]*)"/g.exec(resText)[1];
        // THIS TOKEN NEEDS TO BE CHOSEN BETTER, WORKS ON SOME
        const authToken = resText.split(/name="authenticity_token" value="([\w\/=]*)"/g).filter(t => t.endsWith('=='));
        console.log({ repoName, repoId, authToken })
@benwinding
benwinding / keybase.md
Created September 1, 2018 00:30
keybase proof

Keybase proof

I hereby claim:

  • I am benwinding on github.
  • I am benwinding (https://keybase.io/benwinding) on keybase.
  • I have a public key whose fingerprint is FCA9 AF47 6706 5323 F1E5 B2CB 7321 6BD2 7ABD 8A6F

To claim this, I am signing this object: