Skip to content

Instantly share code, notes, and snippets.

Charlie Stanard lstanard

Block or report user

Report or block lstanard

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lstanard
lstanard / acf-export-2018-01-18
Last active Jan 18, 2018
Catalyst WP Atom Organism Fields
View acf-export-2018-01-18
[
{
"key": "group_5719a52cf2cb2",
"title": "Organisms",
"fields": [
{
"key": "field_5719a52e1711e",
"label": "Organism",
"name": "organism",
"type": "repeater",
View gist:443fd85175e4347ff10f8ae8bd60d5f7
<?php
/**
* Create ACF setting page under Events CPT menu
*
* @since 1.0.0
*/
if ( function_exists( 'acf_add_options_sub_page' ) ){
acf_add_options_sub_page(array(
'title' => 'Event Settings',
'parent' => 'edit.php?post_type=events',
@lstanard
lstanard / gist:1f69829eceff8075275aa30611b38006
Created May 8, 2017
WordPress wp-config.php settings for writing to debug.log file
View gist:1f69829eceff8075275aa30611b38006
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_DISPLAY', false );
define( 'WP_DEBUG_LOG', true );
@lstanard
lstanard / simple-debug-log.php
Last active Mar 7, 2018
WordPress plugin to write debug_log to debug.log file
View simple-debug-log.php
<?php
/*
Plugin Name: Simple Debug Log
*/
if ( ! function_exists('debug_log')) {
function debug_log ( $log ) {
if ( is_array( $log ) || is_object( $log ) ) {
error_log( print_r( $log, true ) );
} else {
View load.php
<?php
// Bokka Utilities must be loaded before all other mu-plugins
// as it contains global variables used elsewhere.
require WPMU_PLUGIN_DIR.'/bokka-wp-utilities/bokka-utilities.php';
require WPMU_PLUGIN_DIR.'/bokka-wp-mvc/bokka-mvc.php';
@lstanard
lstanard / .gitignore
Created Mar 30, 2017
Default Bokka WordPress .gitignore file
View .gitignore
# WordPress #
############
# patternlab-php-master/
# wp-config-local.php
# wp-content/uploads
# wp-content/plugins/debug-log.php
# wp-content/blogs.dir/
# wp-config.php
# wp-content/upgrade/
# wp-content/backup-db/
View gist:a8f94a4be05d156c7368e05a0fb0f8e1
~: cd ~/vagrants/
[develop] vagrants: vagrant up --provision
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/trusty64' is up to date...
==> default: [vagrant-hostsupdater] Checking for host entries
==> default: [vagrant-hostsupdater] found entry for: 192.168.50.4 vvv
==> default: [vagrant-hostsupdater] found entry for: 192.168.50.4 vvv.dev
==> default: [vagrant-hostsupdater] found entry for: 192.168.50.4 local.wordpress.dev
==> default: [vagrant-hostsupdater] found entry for: 192.168.50.4 src.wordpress-develop.dev
==> default: [vagrant-hostsupdater] found entry for: 192.168.50.4 build.wordpress-develop.dev
@lstanard
lstanard / bash git branch
Created Aug 7, 2016
Add git branch name to bash prompt
View bash git branch
function parse_git_branch {
ref=$(git status 2> /dev/null | grep -E "(On branch|detached) .*$" | grep -oE "\S*$") || return
echo "["${ref#refs/heads/}"] "
}
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
fi
PS1='\[\033[0;33m\]$(parse_git_branch)\[\e[32m\]\W\[\e[33m\]: \[\e[0m\]'
View iTerm2 profile
{
"Right Option Key Sends" : 0,
"Tags" : [
],
"Ansi 12 Color" : {
"Green Component" : 0.3333333432674408,
"Blue Component" : 1,
"Red Component" : 0.3333333432674408
},
View Preferences.sublime-settings
{
"auto_complete_delay": 5,
"auto_match_enabled": true,
"binary_file_patterns":
[
"*.jpg",
"*.jpeg",
"*.png",
"*.gif",
"*.ttf",
You can’t perform that action at this time.