This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| Plugin Name: Clean Database | |
| Plugin URI: http://example.com/clean-database | |
| Description: A plugin to clean database by removing post attachments and their generated images older than 180 days | |
| Version: 1.0 | |
| Author: chatgpt | |
| Author URI: http://example.com | |
| License: GPL2 | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // npm install @octokit/rest | |
| const { Octokit } = require("@octokit/rest"); | |
| // Replace "ACCESS_TOKEN" with your personal access token | |
| const octokit = new Octokit({ | |
| auth: "ACCESS_TOKEN", | |
| }); | |
| // Define a function to delete a single repository |