Skip to content

Instantly share code, notes, and snippets.

View macbookandrew's full-sized avatar

Andrew Minion macbookandrew

View GitHub Profile
@macbookandrew
macbookandrew / tribe-events-the_grid.php
Last active June 1, 2017 19:16
Adds dates to [the_grid] shortcode output for Modern Tribe’s The Events Calendar
<?php
/*
* Plugin Name: The Events Calendar + The Grid
* Version: 1.0
* Description: Adds dates to [the_grid] shortcode output for Tribe Events
* Author: AndrewRMinion Design
* Author URI: https://andrewrminion.com
* Plugin URI: https://gist.github.com/macbookandrew/8aedd7809ddf89fabb6fc66a19bd0318
* License: GPL2
*/
@macbookandrew
macbookandrew / wpforms-recaptcha-async.php
Created May 11, 2017 20:52
Force the WPForms Google Recaptcha script to load asynchronously to improve site performance
<?php
/*
* Plugin Name: WPForms: Force Async Scripts
* Plugin URL: https://gist.github.com/macbookandrew/30eb660833192066e5ea7691fc735e9f
* Description: Force the WPForms Google Recaptcha script to load asynchronously to improve site performance
* Version: 1.0.0
* Author: AndrewRMinion Design
* Author URI: https://andrewrminion.com
*/
@macbookandrew
macbookandrew / merge-minify-refresh-async.php
Last active May 11, 2017 20:20
Force merged scripts created by “Merge + Minify + Refresh” to load asynchronously to improve site performance
<?php
/*
* Plugin Name: Merge + Minify + Refresh: Force Async Scripts
* Plugin URL: https://gist.github.com/macbookandrew/0bb0c29b2321c166845cea0b7cdb5d15
* Description: Forces merged scripts created by “Merge + Minify + Refresh” to load asynchronously to improve site performance
* Version: 1.0.0
* Author: AndrewRMinion Design
* Author URI: https://andrewrminion.com
*/
@macbookandrew
macbookandrew / a-seriously-simple-private-podcasting.php
Last active April 25, 2019 01:35
Addon plugin for Seriously Simple Podcasting; includes private podcasts in feed URL
<?php
/**
* Plugin Name: Seriously Simple Private Podcasting
* Plugin URL: https://gist.github.com/macbookandrew/b3e08a9e35a44526e47ecb35d1113c8f
* Description: Include posts marked “private” in podcast feed. Note: activate this <strong>first</strong>, then the Seriously Simple Podcasting plugin.
* Version: 1.1.5
* Author: AndrewRMinion Design
* Author URI: https://andrewrminion.com
*
* @author AndrewRMinion Design
@macbookandrew
macbookandrew / findStyles.js
Last active February 11, 2024 22:30
List unique CSS properties for all DOM elements
/**
* List unique CSS properties for all DOM elements
* Initially created to list unique font stacks on a page
* @see {@link http://stackoverflow.com/a/35022690/ Inspired by this StackOverflow answer}
*
* @see {@link https://gist.github.com/macbookandrew/f33dbbc0aa582d0515919dc5fb95c00a/ URL for this file}
*
* @author AndrewRMinion Design (https://andrewrminion.com)
* @version 1.1
*
@macbookandrew
macbookandrew / functions.php
Created June 21, 2016 19:13
Prevent YouTube embedded videos from showing related videos at the end
/* Prevent YouTube Related Content on oEmbed-ed videos */
add_filter( 'oembed_result', 'prevent_featured_youtube_videos' );
function prevent_featured_youtube_videos( $embed ) {
return str_replace( '?feature=oembed', '?feature=oembed&rel=0', $embed );
}
@macbookandrew
macbookandrew / quote-images.php
Last active May 27, 2016 18:14
WP plugin to show a single random quote image
<?php
/*
* Plugin Name: Quote Images
* Plugin URI: https://gist.github.com/macbookandrew/7172aef947803f1ac439a352548f382f
* Description: Quote images with shortcode for random display
* Version: 1.0.0
* Author: AndrewRMinion Design
* Author URI: https://andrewrminion.com
*/
@macbookandrew
macbookandrew / slack-epoch-comments.php
Last active May 11, 2017 20:01
Add Slack notifications for comments posted via the Epoch comment system
<?php
/*
Plugin Name: Slack Epoch Comments
Plugin URI: https://gist.github.com/macbookandrew/7f41ff7d4b28300f19bd
Description: Adds Slack notifications for comments posted via the Epoch comment system
Version: 1.1.2
Author: AndrewRMinion Design
Author URI: https://andrewrminion.com
*/
@macbookandrew
macbookandrew / WooCommerce Redirects.md
Last active March 13, 2018 11:15
WooCommerce conditionally redirect before checkout page

Purpose

These tweaks build on these directions to allow for full-page customizable Smart Offers.

How to Use

  1. Disable “Enable guest checkout” on the WooCommerce > Settings > Checkout tab
  2. Enable “Automatically generate customer password” on the WooCommerce > Settings > Accounts tab
  3. Set up Smart Offers as normal, choosing the “Any other page where shortcode is added” checkbox for “Show this Offer on:”.
  4. Create a new page to be used for showing the Smart Offers and customize as desired with theme templates, etc. Include the shortcode [so_show_offers] in the page content and make note of the page URL as you’ll need it in the WooCommerce plugin modification.
# Generate Private Key
openssl genrsa -out server.key 4096
# Generate CSR
openssl req -new -out server.csr -key server.key -config openssl.cnf
# => Fill in info
# Check CSR
openssl req -text -noout -in server.csr
# Sign Cert
openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server.crt -extensions v3_req -extfile openssl.cnf