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 / 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
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.application.webviewapp">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
@hansschuijff
hansschuijff / install-wp-plugins.php
Last active April 1, 2024 05:03 — 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 August 6, 2024 22:32
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 ##
@jesugmz
jesugmz / solve-load-pubkey-id_rsa-invalid-format.md
Last active December 2, 2022 23:35
Solve load pubkey "/root/.ssh/id_rsa": invalid format

OpenSSH 8.3p1 introduces the need of having a public SSH key otherwise is gonna show the warning

load pubkey "/root/.ssh/id_rsa": invalid format

# ssh -V
OpenSSH_8.3p1, OpenSSL 1.1.1g  21 Apr 2020

To supress this message we can put in place our SSH public key or generate it from our private key with: