Skip to content

Instantly share code, notes, and snippets.

View leepeterson's full-sized avatar
:octocat:

Lee Peterson leepeterson

:octocat:
View GitHub Profile
body{background:#1C2631;color:#96BDC7}a{color:#96BDC7}a:link,a:visited{color:#96BDC7}a:active,a:focus,a:hover{color:#c7c7c7}hr{border-bottom:1px solid #1C2631;border-top:1px solid #1C2631}h1,h2,h3,h4{color:#96BDC7}h1 a{color:#96BDC7}h1 a:active,h1 a:hover,h1 a:link,h1 a:visited{color:#96BDC7}.bordered{border:1px solid #1C2631}.top_border{border-top:1px solid #1C2631}.bottom_border{border-bottom:1px solid #1C2631}.left_border{border-left:1px solid #1C2631}.right_border{border-right:1px solid #1C2631}.bullet{color:#96BDC7}.alert,.c-alert,.c-alert--boxed{background-color:#1C2631;border-color:#1C2631;color:#96BDC7;text-shadow:0 1px 0 rgba(28, 38, 48, 0.5)}.alert h4,.c-alert h4,.c-alert--boxed h4{color:#96BDC7}.alert-info{background-color:#1C2631;border-color:#1C2631;color:#96BDC7}.alert-info h4{color:#96BDC7}::-webkit-scrollbar-track{background:#1C2631 !important;border-left-color:#1C2631 !important;border-right-color:#1C2631 !important;color:#1C2631 !important}::-webkit-scrollbar-thumb{background:#1C2631 !import
@leepeterson
leepeterson / 01-README.md
Created December 20, 2018 03:18 — forked from petemcw/01-README.md
Mac OS X LEMP Configuration

Mac OS X LEMP Configuration

This Gist is a collection of configuration files that can be used to easily setup a Homebrew-based LEMP stack on Mac OS X.

Files in this repository are numbered and named for ordering purposes only. At the top of each file is a section of metadata that denote what component the file belongs to and the default name & location of the file. Feel free to implement it however you want.

Note: some configuration files have hard-coded paths to my user directory -- fix it for your setup

Setup

@leepeterson
leepeterson / disable_dash.php
Created August 22, 2018 22:40 — forked from bryanwillis/disable_dash.php
Different ways to remove wp dashboard widgets. I think disable_dash.php is considered the best method.
//* REMOVE DASHBOARD WELCOME
remove_action('welcome_panel', 'wp_welcome_panel');
// */
//* REMOVE ADMIN DASHBOARD WIDGETS
// Create the function to use in the action hook
function remove_default_dashboard_widgets() {
@leepeterson
leepeterson / rm-video-formats.md
Last active February 19, 2020 16:55 — forked from Vestride/encoding-video.md
Rawle Murdy's Web Video Requirements

Rawle Murdy's Web Video Requirements

As of July 2018:

  1. 4K WebM video encoded with VP9

2a. 1080p MP4 video encoded with HEVC/H.265

2b. Optional: 1080p MP4 encoded with MPEG-4/H.264 (if Windows Mobile and IE8-11 support is required)

@leepeterson
leepeterson / class-global-sniffer.php
Created September 5, 2017 02:15 — forked from Rarst/class-global-sniffer.php
Discover where is array global being modified, because WordPress.
<?php
namespace Rarst;
/**
* Discover where is array global being modified, because WordPress.
*/
class Global_Sniffer implements \ArrayAccess {
protected $name;
@leepeterson
leepeterson / plugin_debug.php
Created September 2, 2017 09:05 — forked from chasecmiller/plugin_debug.php
Proof of concept of a WordPress mu-plugin to automatically disable plugins that start throwing errors.
<?php
/*
Plugin Name: Plugin Debugging Tool
Description: Proof of concept of a WordPress mu-plugin to automatically disable plugins that start throwing errors. Must be installed as mu-plugin. The first time a plugin errors, it will white screen or show an error. Next page load, it is disabled. There has not been any functionality to remove plugins from the black list. If you'd like to see it developed more, please email chase@crumbls.com Only tested on Apache running PHP7.
Author: Chase C. Miller
Author Email: chase@crumbls.com
Version: 1.0
Author URI: http://crumbls.com
*/
@leepeterson
leepeterson / wp_mail.md
Created August 5, 2017 19:41 — forked from johnbillion/wp_mail.md
WordPress Emails

WordPress Emails

This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.

This is accurate as of WordPress 4.8, and includes some upcoming changes in WordPress 4.9.

There are a few TODOs left. Please bear with me.

INITIALISATION
==============
load wp-config.php
set up default constants
load wp-content/advanced-cache.php if it exists
load wp-content/db.php if it exists
connect to mysql, select db
load object cache (object-cache.php if it exists, or wp-include/cache.php if not)
load wp-content/sunrise.php if it exists (multisite only)
@leepeterson
leepeterson / gist:abfe768dbb222c19e3097a884969c8ac
Last active May 17, 2017 11:20 — forked from levelsio/gist:122907e95956602e5c09
slack2html: Export Slack chat history to HTML
<?
/////////////////////
// slack2html
// by @levelsio
/////////////////////
//
/////////////////////
// WHAT DOES THIS DO?
/////////////////////
//
@leepeterson
leepeterson / 0_reuse_code.js
Created February 4, 2017 01:30
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console