Skip to content

Instantly share code, notes, and snippets.

💭
Hiring rockstar developers

Devin Walker DevinWalker

💭
Hiring rockstar developers
Block or report user

Report or block DevinWalker

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
@DevinWalker
DevinWalker / resize_local_machine.sh
Created Jul 23, 2019 — forked from claygriffiths/resize_local_machine.sh
Resize Local by Flywheel VirtualBox image
View resize_local_machine.sh
# Steps we will take:
# 1. Change Local (Docker Machine) image type (this will take a bit)
# 2. Resize image
# 3. Resize partion
#
# Also see: https://docs.docker.com/articles/b2d_volume_resize/
# IMPORTANT: Make sure Local is not running!
VM_NAME="local-by-flywheel"
NEW_DISK_SIZE=50000
@DevinWalker
DevinWalker / wp-config.php
Created Dec 11, 2017 — forked from emgk/wp-config.php
WP Debug Configurations
View wp-config.php
define('WP_DEBUG', true);
define('SCRIPT_DEBUG',true);
if ( WP_DEBUG ) {
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', true );
@ini_set( 'log_errors', 'On' );
@ini_set( 'display_errors', 'Off' );
@ini_set( 'error_reporting', E_ALL );
@ini_set( 'error_log', 'php_error.log' );
@DevinWalker
DevinWalker / setup-phpunit.sh
Created May 26, 2017 — forked from keesiemeijer/setup-phpunit.sh
Setup PHPUnit for use in the Local by Flywheel app
View setup-phpunit.sh
#!/usr/bin/env bash
# ===============================================================================
# Script to install PHPUnit in the Local by Flywheel Mac app
# These packages are installed
#
# PHPUnit, git, subversion, composer, curl and wget
#
# WordPress and the WP_UnitTestCase are installed in the /tmp directory
# The $WP_CORE_DIR and $WP_TESTS_DIR variables are added to the .bashrc file
View give-tf-custom-styles.css
/* Basic form style cleanup */
ul#give-donation-level-radio-list {
list-style: none;
padding: 0;
}
ul#give-donation-level-radio-list input {
margin: 0 5px 0 3px;
}
@DevinWalker
DevinWalker / give-literal-gateway-labels.php
Created Jan 14, 2016
Call the Gateway by it's name; primarily used for testing purposes
View give-literal-gateway-labels.php
/**
* Call Give Payment Gateways by Name
*
* @param $gateways
*
* @return mixed
*/
function gr_override_gateway_labels( $gateways ) {
$gateways['authorize']['checkout_label'] = 'Authorize';
$gateways['stripe']['checkout_label'] = 'Stripe';
View give-gateways-reordering.php
/**
* Give function to reorder array keys
* @see: http://php.net/manual/en/function.ksort.php
* reorder the keys of an array in order of specified keynames; all other nodes not in $keynames will come after last $keyname, in normal array order
* @param array &$array - the array to reorder
* @param mixed $keynames - a csv or array of keynames, in the order that keys should be reordered
*/
function give_9812491_my_array_reorder_keys(&$array, $keynames){
if(empty($array) || !is_array($array) || empty($keynames)) return;
if(!is_array($keynames)) $keynames = explode(',',$keynames);
@DevinWalker
DevinWalker / give-recurring-dummy-subscriptions.php
Last active Dec 9, 2015
This will add child subscription payments to a given subscription
View give-recurring-dummy-subscriptions.php
<?php
/**
* Create Recurring Dummy Subscriptions
*/
$subscription = new Give_Subscription( 68 );
$args = array(
'subscription_id' => 68,
'amount' => 20,
'transaction_id' => md5(uniqid(rand(), true)),
@DevinWalker
DevinWalker / custom-donation-total-label.php
Last active Dec 23, 2016
Customized the Give donation total label globally
View custom-donation-total-label.php
/**
* Give Custom Donation Total Label
*
* @return string|void
*/
function my123_custom_donation_total_label(){
return __('My Custom Label', 'my_textdomain');
}
@DevinWalker
DevinWalker / give-addon-banner-activation.php
Last active Oct 10, 2015
To use the banner class built into Give's core use the following
View give-addon-banner-activation.php
<?php
/**
* Give NAME OF ADD-ON Activation Banner
*
* @description: Includes and initializes the activation banner class; only runs in WP admin
* @hook admin_init
*/
function give_myaddon_activation_banner() {
if ( ! class_exists( 'Give_Addon_Activation_Banner' ) && file_exists( GIVE_PLUGIN_DIR . 'includes/admin/class-addon-activation-banner.php' ) ) {
@DevinWalker
DevinWalker / Beanstalk_to_GitHub
Created Oct 9, 2015 — forked from bovasso/Shallow Clone Transer Repo
Move Git Repository from Beanstalk to GitHub with full repository history
View Beanstalk_to_GitHub
#Example moving the DPSG Global Library
# 1 Checkout the Beanstalk Repo
git clone --bare git@codeandtheory.beanstalkapp.com:/dpsg-global-library.git
# 2 Push into your desired GitHub repo. (Please note that you must create the github repo prior to this step)
git push --mirror git@github.com:codeandtheory/dpsg-global-library.git
You can’t perform that action at this time.