Skip to content

Instantly share code, notes, and snippets.

View jessuppi's full-sized avatar
❤️
let the bodies hit the floor

Jesse Nickles jessuppi

❤️
let the bodies hit the floor
View GitHub Profile
@jessuppi
jessuppi / gist:652903b8d45c903ceb292a0c9f0d604f
Created February 24, 2025 19:45
Prune WordPress Users Bash Script For SlickStack
#!/bin/bash
## source ss-config ##
source /var/www/ss-config
## source ss-functions ##
source /var/www/ss-functions
## BELOW THIS RELIES ON SS-CONFIG AND SS-FUNCTIONS
@afragen
afragen / git-updater-dot-org-overrides.php
Last active October 13, 2024 16:06
One off plugin to add Git Updater dot org overrides so the hook remains active even when the specific plugin is not active.
<?php
/**
* Git Updater Overrides for WP.org repo.
*
* @package GU_Overrides
*
* Plugin Name: Git Updater Overrides for WP.org
* Plugin URI: https://gist.github.com/afragen/763e57af7ddc5a40692fdf5d977f2902
* Description: Override WP.org updates for plugins and themes in favor of updates from Git Updater.
* Version: 0.2.0
@jessuppi
jessuppi / anonymize-bbpress.php
Last active September 2, 2022 21:07 — forked from birgire/bbpmods_anonymous.php
WordPress plugin: BBPMods Anonymous
<?php
/**
* Plugin Name: Anonymize bbPress
* Description: bbPress anonymous modifications.
* Version: 0.0.2
* Requires PHP: 5.4
*/
/**
* Changelog.
<?php
/*
Plugin Name: Anonymize bbPress
Plugin URI: https://gist.github.com/jessuppi/0663069e94af7f397510990ccd576a30
Description: Enables guest users to participate in bbPress forums without providing an email address or URL, and assigns randomized user names to every single post.
Version: 1.0.0
Author: Birgir Erlendsson, Jesse Nickles
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html
*/
#!/bin/bash
FIFO="/path-to-ss_cmd.txt";
LIST="$(sort -u $FIFO)";
for CMD in $LIST; do
$CMD
done
rm $FIFO;
<?php
// Exec
// call: do_action('ss_cmd', 'cmd1');
add_action('ss_cmd', function($cmd) {
switch($cmd) {
case 'cmd1':
return shell_exec('cmd1');
break;
case 'cmd2':
<?php
/*
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@hansschuijff
hansschuijff / install-wp-plugins.php
Last active January 26, 2025 19:41 — forked from squarestar/install-wp-plugins.php
Programmatically install and activate wordpress plugins
<?php
/**
* Plugin Name: Activate required plugins.
* Description: Programmatically install and activate plugins based on a runtime config.
* Version: 1.0
* Author: Hans Schuijff
* Author URI: http://dewitteprins.nl
* License: MIT
* License URI: http://www.opensource.org/licenses/mit-license.php
*/
@nginx-gists
nginx-gists / ubuntu_install.sh
Last active March 17, 2025 15:16
Automating Installation of WordPress with NGINX Unit on Ubuntu
#!/usr/bin/env bash
if [ "$EUID" -ne 0 ];then
>&2 echo "This script requires root level access to run"
exit 1
fi
if [ -z "${WORDPRESS_DB_PASSWORD}" ]; then
>&2 echo "WORDPRESS_DB_PASSWORD must be set"
>&2 echo "Here is a random one that you can paste:"
@jessuppi
jessuppi / gist:3356c3031281872eb85120020fca4daa
Last active September 10, 2020 20:21
SlickStack Bash Functions (Aliases) + Environment Variables
#!/bin/bash
####################################################################################################
#### SlickStack: Critical Bash Functions (Aliases) + Script Variables ##############################
####################################################################################################
## the below functions are hardcoded into every SlickStack script to ensure reliability ##
## this also speeds up processing times by avoiding repeated inline commands ##
## add-apt-repository alias flags ##