Skip to content

Instantly share code, notes, and snippets.

View jordantrizz's full-sized avatar

Jordan jordantrizz

View GitHub Profile
@jordantrizz
jordantrizz / gist:fd058cca6f2c832e4776392348a00aed
Last active December 20, 2019 03:07
Patch File for Including Taxes in Booster for WooCommerce Minimum Orders
--- booster-plus-for-woocommerce/includes/class-wcj-order-min-amount.php 2019-12-12 19:27:10.073916633 +0000
+++ booster-plus-for-woocommerce/includes/class-wcj-order-min-amount.php 2019-12-20 02:41:28.750399681 +0000
@@ -105,7 +105,8 @@
if ( 'yes' === get_option( 'wcj_order_minimum_amount_exclude_shipping', 'no' ) ) {
$shipping_total = isset( WC()->cart->shipping_total ) ? WC()->cart->shipping_total : 0;
$shipping_tax_total = isset( WC()->cart->shipping_tax_total ) ? WC()->cart->shipping_tax_total : 0;
- $cart_total -= ( $shipping_total + $shipping_tax_total );
+ $tax_total = isset( WC()->cart->tax_total ) ? WC()->cart->tax_total : 0;
+ $cart_total -= ( $shipping_total + $shipping_tax_total + $tax_total);
}
@jordantrizz
jordantrizz / booster_hidden_item_meta_fix.php
Last active April 23, 2019 21:14
Booster for WooCommerce Short Codes Showing Hidden Item Meta like _wc_cog and _reduced_stock
<?php
/*
* Plugin Name: Booster Hidden Item Meta Fix
* Plugin URI: https://www.geektank.net/2019/04/booster-for-woocommerce-showing-hidden-item-meta/
* Description: This plugin fixes hidden item meta from showing on specific Booster for WooCommerce shortcodes
* Author: Jordan
* Version: 0.1
The following code will hide meta for the following plugins which should not be shown as they're
suppose to be hidden.
@jordantrizz
jordantrizz / gist:6cf84aadd3bdc9383dfa04a20b181013
Created September 27, 2018 18:15
Installing Redis PHP 7.2 Module for Litespeed Native on Ubuntu 18
# Pre-req is the Litespeed Ubuntu repository
apt-get install lsphp72-dev
cd /tmp
wget https://github.com/phpredis/phpredis/archive/master.zip -O phpredis.zip
unzip -o /tmp/phpredis.zip
mv /tmp/phpredis-* /tmp/phpredis
cd /tmp/phpredis
/usr/local/lsws/lsphp72/bin/phpize7.2
./configure --with-php-config=/usr/local/lsws/lsphp72/bin/php-config
make

Keybase proof

I hereby claim:

  • I am jordantrizz on github.
  • I am c0mm (https://keybase.io/c0mm) on keybase.
  • I have a public key ASBH3HoXM1qCAG_67dSh6pLffseAR_FqkAt4EtrhLFWMtgo

To claim this, I am signing this object:

Sometimes the web run fails. Currently, mine fails when using SSL and a few other things. So I created a way to run exploit scanner from the command line using the following code. I got no errors but a proper scan. The issue then is most likely the feed back via Javascript that happens not the actual exploit scanner. I named this 'exploitscan.php' and put it in my utility directory of other useful tools.
<?php
$_SERVER['SERVER_NAME'] = "your.serverurl.com";
include("/usr/share/wordpress/wp-load.php");
error_reporting(E_ERROR|E_PARSE);
$fsl = 400;
$dis = 1;
set_time_limit(0);