Skip to content

Instantly share code, notes, and snippets.

View carter2422's full-sized avatar

Jonathan Williamson carter2422

View GitHub Profile
Oct 05 09:53:47 cgcookie-staging-remote-syslog2-1 hhvm.error.log: \nFatal error: Call to undefined method FES_Formbuilder_Templates::text() in /home/alpha/deployments/cgcookiemarketsstaging.com/releases/20151005144429/web/app/plugins/edd-fes/classes/admin/formbuilder/class-formbuilder.php on line 271
Jonathans-Pro:cgcookie jonathanwilliamson$ cap five deploy
INFO [e826f06c] Running /usr/bin/env mkdir -p /tmp/cgcookie.com/ as alpha@45.33.121.146
DEBUG [e826f06c] Command: ( WP_ENV=five /usr/bin/env mkdir -p /tmp/cgcookie.com/ )
INFO [e826f06c] Finished in 0.227 seconds with exit status 0 (successful).
DEBUG Uploading /tmp/cgcookie.com/git-ssh.sh 0.0%
INFO Uploading /tmp/cgcookie.com/git-ssh.sh 100.0%
INFO [2aaefc8e] Running /usr/bin/env chmod +x /tmp/cgcookie.com/git-ssh.sh as alpha@45.33.121.146
DEBUG [2aaefc8e] Command: ( WP_ENV=five /usr/bin/env chmod +x /tmp/cgcookie.com/git-ssh.sh )
INFO [2aaefc8e] Finished in 0.032 seconds with exit status 0 (successful).
INFO [1a5b05c4] Running /usr/bin/env git ls-remote --heads git@github.com:CGCookie/cgcookie.git as alpha@45.33.121.146
<fieldset class="rcp_subscription_fieldset">
<?php $levels = rcp_get_subscription_levels( 'active' );
if( $levels ) : ?>
<h4 class="signup--fieldset__title">Subscription Options</h4>
<p>Memberships are auto-renewing, though can be cancelled at any time through your dashboard.</p>
<ul id="rcp_subscription_levels">
<?php foreach( $levels as $key => $level ) : ?>
<?php if( rcp_show_subscription_level( $level->id ) ) : ?>
<li id="rcp_subscription_level_<?php echo $level->id; ?>" class="rcp_subscription_level">
<input id="<?php echo 'rcp-level-'.$level->id;?>" type="radio" class="required rcp_level" <?php if( $key == 0 || ( isset( $_GET['level'] ) && $_GET['level'] == $key ) ) { echo 'checked="checked"'; } ?> name="rcp_level" rel="<?php echo esc_attr( $level->price ); ?>" value="<?php echo esc_attr( absint( $level->id ) ); ?>" <?php if( $level->duration == 0 ) { echo 'data-duration="forever"'; } ?>/>
@carter2422
carter2422 / showErrorMessage
Created January 4, 2015 17:45
Simple Error Popup
def showErrorMessage(message, wrap=80):
lines = []
if wrap > 0:
while len(message) > wrap:
i = message.rfind(' ',0,wrap)
if i == -1:
lines += [message[:wrap]]
message = message[wrap:]
else:
lines += [message[:i]]
@carter2422
carter2422 / alternate-unhide
Last active August 29, 2015 14:10
Unhide objects and keep them unselected.
bl_info = {
"name": "Alternate Object Hiding",
"author": "Jonathan Williamson",
"version": (1, 0),
"blender": (2, 65, 0),
"location": "View3D",
"description": "Unhides objects while keeping them deselected",
"warning": "",
"wiki_url": "",
"category": "Object"}
@carter2422
carter2422 / blender_keymap_default
Created November 9, 2014 18:00
This is the default keymap for Blender.
import bpy
import os
def kmi_props_setattr(kmi_props, attr, value):
try:
setattr(kmi_props, attr, value)
except AttributeError:
print("Warning: property '%s' not found in keymap item '%s'" %
(attr, kmi_props.__class__.__name__))
except Exception as e:
// Track account upgrade
function cgc_rcp_account_upgrade( $user_id, $data ) {
if( ! function_exists( 'rcp_get_subscription_name' ) )
return;
$mp = Mixpanel::getInstance( CGC_MIXPANEL_API );
$user = get_userdata( $user_id );
<?php
/*
Plugin Name: Show Posts Short Code
Version: 0.0.1
Author: Jonathan Williamson
*/
function jonathan_show_posts_shortcode($atts, $content = null ) {
@carter2422
carter2422 / gist:11261176
Last active August 29, 2015 14:00
Account Upgrade
// Track account upgrade
function cgc_rcp_account_upgrade( $user_id, $data ) {
if( ! function_exists( 'rcp_get_subscription_name' ) )
return;
$mp = Mixpanel::getInstance( CGC_MIXPANEL_API );
$user = get_userdata( $user_id );
@carter2422
carter2422 / mixpanel-false-expiration
Created April 8, 2014 18:48
Getting a 'false' expiration on Membership Payment events
// Track account upgrade via gift redemption
function cgc_rcp_track_payment( $payment_id = 0, $args = array(), $amount ) {
if( ! function_exists( 'rcp_get_subscription_name' ) )
return;
global $wpdb;
$mp = Mixpanel::getInstance( CGC_MIXPANEL_API );