Skip to content

Instantly share code, notes, and snippets.

View craigcooperxyz's full-sized avatar

Craig Cooper craigcooperxyz

View GitHub Profile
/*
========================================================================
https://www.linkedin.com/in/moorejonathan/
https://twitter.com/nathanless
========================================================================
*/
Home
@tjmapes
tjmapes / gist:ed95d1698324b162f595a9825687d83c
Created May 2, 2018 14:54
Add the power and convenience of scheduling to your Shopify Theme using liquid - Medium Post
{%- assign current_date_time = 'now' | date: "%Y%m%d%H%M" -%}
{%- comment %}choose start date{%- endcomment -%}
{%- assign start_year = section.settings.start_year -%}
{%- assign start_month = section.settings.start_month -%}
{%- assign start_day = section.settings.start_day -%}
{%- assign start_hour = section.settings.start_hour | remove: ':' -%}
{%- assign start_date = start_year | append: start_month | append: start_day | append: start_hour | convert: "date" -%}
{%- comment %}choose end date{%- endcomment -%}
@BrainlabsDigital
BrainlabsDigital / Campaign Budget Overspend Monitoring
Last active October 29, 2022 12:13
Labels (and optionally pauses) campaigns that are overspending too much, and emails you a warning.
/**
*
* Campaign Budget Overspend Monitoring
*
* This script labels campaigns whose spend today is more than their daily
* budgets. Optionally, it also pauses campaigns whose spend exceeds the
* budget by too much. An email is then sent, listing the newly labelled
* and paused campaigns.
* When spend no longer exceeds budget, the campaigns are reactivated and
* labels are removed.
@tairli
tairli / tabbed-description.liquid
Last active February 13, 2023 08:04
Tabbed description code for Shopify. "Slice" your description with <H6> elements (which will serve as tab titles) and stop with <H5> element.
{% comment %}
if combine_pretext is false, the text before the first <h6> will be shown above all tabs, otherwise added to the first tab
if stop_on_h5 is true, tabs parsing will stop on first H5 element and the rest will be shown below tabs.
What's inside H5 is discarded, but still put something meneningfull there, just in case you switch theme or alike.
No multiple H5 elements.
{% endcomment %}
{% assign combine_pretext = false %}
{% assign stop_on_h5 = true %}
@royharmon4
royharmon4 / gist:560ebaab757b1b3e20bf48e192119ee4
Created October 27, 2016 15:14
Pulling AdWords impression share data into an AdWords script
// This will pull impression share data into a script for you to use:
function main() {
var accountIterator = MccApp.accounts().get();
var mccAccount = AdWordsApp.currentAccount();
while (accountIterator.hasNext()) {
var account = accountIterator.next();
MccApp.select(account);
var accountName = account.getName();
@maxrice
maxrice / wc-hide-coupons-cart-checkout.php
Created January 21, 2014 23:43
WooCommerce - hide the coupon form on the cart or checkout page, but leave coupons enabled for use with plugins like Smart Coupons and URL Coupons
<?php
// hide coupon field on cart page
function hide_coupon_field_on_cart( $enabled ) {
if ( is_cart() ) {
$enabled = false;
}
return $enabled;
@awshout
awshout / foundation4-topbar-menu.php
Last active September 5, 2024 01:34
WordPress Menu & Walker for ZURB's Foundation 4 Top Bar
<?php
add_theme_support('menus');
/**
* Register Menus
* http://codex.wordpress.org/Function_Reference/register_nav_menus#Examples
*/
register_nav_menus(array(
'top-bar-l' => 'Left Top Bar', // registers the menu in the WordPress admin menu editor
'top-bar-r' => 'Right Top Bar'
@nicoleslaw
nicoleslaw / 1_Tiny_Content_Framework.md
Last active October 1, 2024 16:26
Tiny Content Framework

Tiny Content Framework

About the project

This is a tiny content strategy framework focused on goals, messages, and branding. This is not a checklist. Use what you need and scrap the rest. Rewrite it or add to it. These topics should help you get to the bottom of things with clients and other people you work with.

Give me feedback on Twitter (@nicoleslaw) or by email ([email protected]).

Contents