Skip to content

Instantly share code, notes, and snippets.

View abracadabra80's full-sized avatar

Andreas Braun abracadabra80

View GitHub Profile
<?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
*/
@abracadabra80
abracadabra80 / deleteForkedRepositorie
Created March 11, 2023 21:23
Delete named or all forked repositories from github profile
// 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