Skip to content

Instantly share code, notes, and snippets.

Jacob Dubail jacobdubail

Block or report user

Report or block jacobdubail

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
jacobdubail / ga_ecommerce.js
Created Jul 10, 2018
GA Ecommerce Snippet
View ga_ecommerce.js
<script type="text/javascript">
ga('require', 'ecommerce');
ga('ecommerce:addTransaction', {
'id': '1234', // Transaction ID. Required.
'affiliation': 'Acme Clothing', // Affiliation or store name.
'revenue': '11.99', // Grand Total.
'shipping': '5', // Shipping.
'tax': '1.29' // Tax.
jacobdubail / php
Last active Feb 20, 2019
Absorb WordPress SSO
View php
Class AbsorbLMS {
//protected private key from Absorb Admin
protected $private_key = "*******";
//admin login creds to Absorb
protected $absorb_api_url = "";
protected $external_login_url = "";
jacobdubail / php
Created Jan 11, 2018
FoxyShop VAT Pricing
View php
add_action('admin_menu', 'jtd_vat_settings_menu');
function jtd_vat_settings_menu() {
add_submenu_page('edit.php?post_type=foxyshop_product', __('VAT Display', 'foxyshop'), __('VAT Display', 'foxyshop'), apply_filters('foxyshop_settings_perm', 'manage_options'), 'foxyshop_vat_display', 'foxyshop_vat_display');
function foxyshop_vat_display() {
global $foxyshop_settings, $foxycart_version_array;
if (isset($_GET['saved'])) echo '<div class="updated"><p>' . __('Your Settings Have Been Saved.', 'foxyshop') . '</p></div>';
View sub-status.php
$time_start = microtime(true);
$klaviyo = new Klaviyo(KLAVIYO_KEY);
$fc = jtd_bc_setup_foxycart_api();
$store = $fc->get($fc->getLink("fx:store"));
jacobdubail / php
Created Jan 30, 2017
Function to auto-set your ACF5 Pro license key
View php
function jtd_acf_auto_set_license_keys() {
if ( !get_option('acf_pro_license') && defined('ACF_5_KEY') ) {
$save = array(
'key' => ACF_5_KEY,
'url' => home_url()
$save = maybe_serialize($save);
View gist:78d14e997e4ebdda8e05
This XML file does not appear to have any style information associated with it. The document tree is shown below.
The request signature we calculated does not match the signature you provided. Check your key and signing method.
AWS4-HMAC-SHA256 20160112T010333Z 20160112/us-west-2/s3/aws4_request 1a1f494a1f840c222d027dbd98b32537006d49273452db79cf793d2f36463d65
jacobdubail / utm_cookies.js
Created Nov 11, 2015
Set each utm_ query string param as a cookie
View utm_cookies.js
* JavaScript Cookie v2.0.4
* Copyright 2006, 2015 Klaus Hartl & Fagner Brack
* Released under the MIT license
(function (factory) {
if (typeof define === 'function' && define.amd) {
jacobdubail / json
Created Oct 20, 2015
Facet WP AJAX Output
View json
{"facets":[],"template":"<body class=\"archive post-type-archive post-type-archive-foxyshop_product logged-in admin-bar no-customize-support custom-background full-width-content debug-bar-maximized foxyshop foxyshop-all-products\" itemscope itemtype=\"http:\/\/\/Blog\"><div class=\"site-container\"><header class=\"site-header\" itemscope itemtype=\"http:\/\/\/WPHeader\"><div class=\"wrap\"><div class=\"title-area\"><h1 class=\"site-title\" itemprop=\"headline\"><a href=\"http:\/\/\/\">Manufacturing Surplus<\/a><\/h1><\/div><div class=\"widget-area header-widget-area\"><section id=\"nav_menu-2\" class=\"widget widget_nav_menu\"><div class=\"widget-wrap\"><nav class=\"nav-header\" itemscope itemtype=\"http:\/\/\/SiteNavigationElement\"><ul id=\"menu-main-nav\" class=\"menu genesis-nav-menu\"><li id=\"menu-item-9\" class=\"menu-item menu-item-type-post_type menu-item-object-page menu-item-9\"><a href=\"http:\/\/\/\" itemprop=\"url\"><span it
View Center Align
@mixin center-align($dir: false) {
$map: (
top: ( Y ),
left: ( X )
@if map_get($map, $dir) != null {
#{$dir}: 50%;
transform: #{"translate#{map_get($map,$dir)}(-50%)"};
} @else {
View 1. Example.scss
@include keyframe(fadeout) {
0% {
opacity: 1;
100% {
opacity: 0;
You can’t perform that action at this time.