Skip to content

Instantly share code, notes, and snippets.

View carlitoescobar's full-sized avatar
👁️
Looking

Carlito carlitoescobar

👁️
Looking
View GitHub Profile
@carlitoescobar
carlitoescobar / install nano.sh
Created December 10, 2020 06:53 — forked from BlakeGardner/install nano.sh
Syntax highlighting in nano on Mac OS
# install Homebrew if you don't already have it: http://mxcl.github.io/homebrew/
# install nano from homebrew
brew install nano
# update your nanorc file with the contents of the nanorc file below
nano ~/.nanorc
# close and re-open your terminal and you'll have syntax highlighting
(function($){
$.fn.quantityDiscounts = function(options) {
// set up default options
var defaults = {
discountColor: '#FF0000',
discounts: [
{ limit: 174, discount: .75, text: "25% Discount Applied"},
{ limit: 139, discount: .80, text: "20% Discount Applied"},
@carlitoescobar
carlitoescobar / functions.php
Created June 29, 2021 20:22 — forked from cliffordp/functions.php
Automatically login a single WordPress user upon arrival to a specific page.
<?php
/**
* Automatically login a single WordPress user upon arrival to a specific page.
*
* Redirect to home page once logged in and prevent viewing of the login page.
* Compatible with WordPress 3.9.1+
* Updated 2014-07-18 to resolve WP_DEBUG notice: "get_userdatabylogin is deprecated since version 3.3! Use get_user_by('login') instead."
* Updated 2019-07-09 to reformat code, pass 2nd parameter to `do_action()`, and hook into priority 1.
*
@carlitoescobar
carlitoescobar / gist:54fd0fba733fe1290cc1681bde931193
Created March 23, 2022 20:57 — forked from NikV/gist:bb1ca7ce478c0c60d155
Examples for: gform_post_payment_callback
/**
* Send a notification after a user attempts a purchase
*
* @param $entry The Entries object
* @param array $action The Action Object
* $action = array(
* 'type' => 'cancel_subscription', // See Below
* 'transaction_id' => '', // What is the ID of the transaction made?
* 'subscription_id' => '', // What is the ID of the Subscription made?
@carlitoescobar
carlitoescobar / gist:8ab734d123bfc8f39520e6ec8d692872
Created March 23, 2022 20:57 — forked from NikV/gist:7b7ec046df69b1f390bf
Example for: gform_post_payment_completed
/**
* Fires after a payment has been completed
*
* @param array $entry The Entry object
* @param array $action The Action Object
* $action = array(
* 'type' => 'cancel_subscription', // See Below
* 'transaction_id' => '', // What is the ID of the transaction made?
* 'subscription_id' => '', // What is the ID of the Subscription made?
* 'amount' => '0.00', // Amount to charge?