Skip to content

Instantly share code, notes, and snippets.

View JDGrimes's full-sized avatar

J.D. Grimes JDGrimes

View GitHub Profile
@theMikeD
theMikeD / inline_css_file.php
Created June 16, 2017 17:00
Used to insert a CSS file <link> tag once no matter how often it's called. HTTP/2 inline CSS is why I wrote this.
<?php
// This is defined somewhere high up in functions.php
// $GLOBALS['cnmd_inline_css_record'] = array();
/**
* Used to shoot out css files in-line, and only once per file. Uses the CSS ID as an
* index into an array to prevent dupes.
*
@jbuchbinder
jbuchbinder / wp-deprecated-checker.sh
Last active August 26, 2016 16:57
WP deprecated function check
#!/bin/bash
#
# Wordpress Deprecated function checker
#
# Version: 0.2
#
# Author: Michiel Roos <michiel@donationbasedhosting.org>
# Jeff Buchbinder (https://github.com/jbuchbinder)
#
# www.php.net/manual/en/migration53.deprecated.php
D pre_comment_author_name
H dashboard_primary_title - on hold
D wpmu_signup_user_notification
D the_weekday_date
D post_row_actions
D wp_terms_checklist_args
D post_comments_feed_link
D get_the_generator_{$type}
D teeny_mce_buttons
D posts_join_paged
@amfeng
amfeng / index.php
Last active August 8, 2022 19:33
Stripe OAuth Example -- PHP
<?php
define('CLIENT_ID', 'YOUR_CLIENT_ID');
define('API_KEY', 'YOUR_API_KEY');
define('TOKEN_URI', 'https://connect.stripe.com/oauth/token');
define('AUTHORIZE_URI', 'https://connect.stripe.com/oauth/authorize');
if (isset($_GET['code'])) { // Redirect w/ code
$code = $_GET['code'];
@scribu
scribu / plugin-deploy.sh
Created August 4, 2011 12:18
Plugin deploy
#!/usr/bin/env bash
# args
MSG=${1-'deploy from git'}
BRANCH=${2-'trunk'}
# paths
SRC_DIR=$(git rev-parse --show-toplevel)
DIR_NAME=$(basename $SRC_DIR)
DEST_DIR=~/svn/$DIR_NAME/$BRANCH