Skip to content

Instantly share code, notes, and snippets.

View dannyvankooten's full-sized avatar
🌳

Danny van Kooten dannyvankooten

🌳
View GitHub Profile
window.fetch('https://api.wordpress.org/plugins/info/1.2/?action=query_plugins&per_page=500&search=forms').then(r => r.json()).then(d => {
let sortedPlugins = d.plugins.sort((a, b) => a.downloaded < b.downloaded);
console.log("plugins", sortedPlugins);
console.log(sortedPlugins.map(p => `${p.name} (${p.slug}): ${Math.round(p.downloaded/1000)}K downloads`).join("\n"));
});
@dannyvankooten
dannyvankooten / README.md
Last active December 9, 2022 18:58
Delete all of your GitHub gists w/ Python

Delete all of your GitHub gists

  1. Ensure Python3.x and the requests library is installed.
  2. Create a personal access token and give it the gists permission.
  3. Store the access token in the GITHUB_TOKEN environment value
  4. Run the script
python3 delete-gists.py