Skip to content

Instantly share code, notes, and snippets.

@BronsonQuick
BronsonQuick / gist:6deeb941207eaa6ac56e
Created April 19, 2015 00:17
Update git with Brew
brew update && brew upgrade git
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Foundation Mega Menu</title>
<link rel="stylesheet" href="css/app.css" />
<link href="http://cdnjs.cloudflare.com/ajax/libs/foundicons/3.0.0/foundation-icons.css" rel="stylesheet">
<script src="bower_components/modernizr/modernizr.js"></script>
</head>
@BronsonQuick
BronsonQuick / delete_all_woocommerce_subscriptions.php
Last active June 19, 2023 14:37
Delete All WooCommerce Subscriptions
<?php
/*
Plugin Name: Delete All Subscriptions
Plugin URI:
Description: Delete all of those bad boys
Author:
Author URI:
Version: 1.0
*/
function mystic_delete_all_subscriptions() {
@BronsonQuick
BronsonQuick / wp_cli_command_to_delete_all_woocommerce_users
Created April 16, 2015 04:32
WP-CLI command to delete all WooCommerce users
wp user list --field=ID --role=customer | xargs wp user delete --yes
@BronsonQuick
BronsonQuick / Flush memcache inside of Salty WordPress
Created February 9, 2015 05:39
Flush memcache inside of Salty WordPress
echo 'flush_all' | nc localhost 11211
#!/bin/bash
# (not really -- run these commands by hand & pay attention to the comments)
# Homebrew: The missing package manager for OS X
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Git
brew install git
git config --global --add merge.ff false
@BronsonQuick
BronsonQuick / sql_to_get_database_sizes_in_phpMyAdmin
Created October 22, 2014 03:02
SQL to get database sizes in phpMyAdmin
SELECT table_schema "Data Base Name",
sum( data_length + index_length ) / 1024 / 1024 "Data Base Size in MB"
FROM information_schema.TABLES GROUP BY table_schema ;
@BronsonQuick
BronsonQuick / better_backtracing_in_wordpress.php
Created July 1, 2014 06:18
Better backtracing in WordPress
<?php
/*
* Better backtracing to fix dodgy themes and plugins. Pop this into mu-plugins
*/
function sennza_backtrace() {
echo implode( '<br>', explode( ',', wp_debug_backtrace_summary( null, 4 ) ) );
};
add_action( 'deprecated_function_run', 'sennza_backtrace' );
# Chassis Configuration
#
# This file is the default configuration for all projects. The fallback order of
# configuration files is:
#
# - project/content/config.local.yaml (project-specific overrides)
# - project/content/config.yaml (project-specific defaults)
# - project/config.local.yaml (global overrides)
# - project/config.yaml (global defaults)
@BronsonQuick
BronsonQuick / add_tinymce_custom_classes_with_backwards_compatibility.php
Last active August 29, 2015 14:01
Add TinyMCE custom classes to WordPress with backwards compatibility
<?php
Sometimes we want to give clients access to additional styles in TinyMCE. These functions also handle backwards compatibility with WordPress as TinyMCE 3 and TinyMCE 4 handle this differently
function sennza_mce_buttons( $buttons ) {
array_unshift( $buttons, 'styleselect' );
return $buttons;
}
add_filter( 'mce_buttons_2', 'sennza_mce_buttons' );
function sennza_mce_before_init( $init_array ) {