Skip to content

Instantly share code, notes, and snippets.

View DevinWalker's full-sized avatar
🌱
Coding for good

Devin Walker DevinWalker

🌱
Coding for good
View GitHub Profile
<?php
/*
Plugin Name: Easy Digital Downloads - Variable Pricing License Activation Limits
Plugin URL: http://easydigitaldownloads.com/extension/
Description: Limit the number of license activations permitted based on variable prices. This plugin has not been published officially yet. The plugin author gave this codes in a support ticket. So don't rellay on it completely.
Version: 1.1
Author: Pippin Williamson
Author URI: http://pippinsplugins.com
Contributors: mordauk , oneTarek
@drrobotnik
drrobotnik / gist:293f9aafd03bc7b51506
Last active August 29, 2015 14:23
remove wp_rollback for certain cases
<?php
// Untested Gist
function remove_wp_rollback() {
if( class_exists( 'WP_Rollback' ) ) :
if( ! current_user_can( 'invented_cap' ) ) :
remove_action( 'plugins_loaded', array( 'WP_Rollback', 'load_textdomain' ) );
//Admin
remove_action( 'admin_enqueue_scripts', array( 'WP_Rollback', 'scripts' ) );
remove_action( 'admin_menu', array( 'WP_Rollback', 'admin_menu' ), 20 );
# custom login link
RewriteRule ^login$ http://localhost/whitelabel/wp-login.php [NC,L]
@mikesherov
mikesherov / grunt.md
Created April 25, 2012 12:56
getting grunt to work on windows with cygwin and git

Getting grunt to work with Cygwin and git on Windows is a bit difficult considering the cygwin package that is installed by git has an outdated version of node running on it (at least that was the case in Windows XP). There are several issues to work through:

  1. Cygwin by default installs an old version of node, this was only the case in my Windows XP machine.
  2. Open Cygwin shell
  3. which node tells you where the executable is
  4. node --version tells you if it's old
  5. cd to the directory listed by which node
  6. mv node.exe node.exe.bak
  7. download node from nodejs.org and install it
  8. Node installed through installer MIGHT not update PATH to point to correct version of node installed normally.
@DevinWalker
DevinWalker / give-recurring-dummy-subscriptions.php
Last active December 9, 2015 01:10
This will add child subscription payments to a given subscription
<?php
/**
* Create Recurring Dummy Subscriptions
*/
$subscription = new Give_Subscription( 68 );
$args = array(
'subscription_id' => 68,
'amount' => 20,
'transaction_id' => md5(uniqid(rand(), true)),
<?php
/*
Plugin Name: Easy Digital Downloads - Variable Pricing License Activation Limits
Plugin URL: http://easydigitaldownloads.com/extension/
Description: Limit the number of license activations permitted based on variable prices
Version: 1.0
Author: Pippin Williamson
Author URI: http://pippinsplugins.com
Contributors: mordauk
*/
@dougedgington
dougedgington / functions.php
Last active December 20, 2015 12:59
Force SSL on Woocommerce pages and two additional custom pages
<?php
/*
Author: Doug Edgington
Description: modified version of Woocomemrce SSL functionality, forces ssl on Woocommerce pages and two additional custom pages
*/
function dee_ssl_template_redirect() {
if ( ! is_ssl() ) {
if ( is_checkout() || is_account_page() || is_page(48) || is_page(64) ) {
@Overbryd
Overbryd / anchors_on_the_fly.diff
Created July 20, 2011 07:52
InfoBubble set anchors / position on the fly
@@ -347,6 +347,20 @@ InfoBubble.prototype.setArrowStyle = function(style) {
InfoBubble.prototype['setArrowStyle'] =
InfoBubble.prototype.setArrowStyle;
+InfoBubble.prototype.setAnchor = function(anchor) {
+ if (anchor) {
+ this.set('anchor', anchor);
+ this.bindTo('anchorPoint', anchor);
+ this.bindTo('position', anchor);
+ } else if (this.get('anchor')) {
function recent_donors_function() {
//Get the latest 100 Give Donors
$args = array(
'number' => 100,
function recent_donors_function() {
$donors = Give() - > customers - > get_customers($args);
foreach($donors as $donor) {
@xeiter
xeiter / unit-testing-with-pressmatic.md
Last active March 16, 2017 01:18 — forked from tommcfarlin/unit-testing-with-pressmatic.md
[WordPress] Unit Testing with Pressmatic

Unit Testing with Pressmatic

  • Updated 20 August 2016

Installing Composer on Pressmatic

  1. SSH into the Pressmatic box
  2. $ apt-get update
  3. $ apt-get install curl php5-cli git subversion
  4. $ curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer