Skip to content

Instantly share code, notes, and snippets.

<div class="medium-6 columns">
<div class="content-wrap">
<h3><span class="subheading">Learn 'How to' with our</span>{{ section.settings.video_title }}</h3>
<p>{{ section.settings.video_sub }}</p>
<a data-fancybox href="https://www.youtube.com/watch?v={{ section.settings.video_code }}" class="button">View Video</a>
</div>
</div>
<div class="medium-6 columns">
<a data-fancybox class="image-wrap" href="https://www.youtube.com/watch?v={{ section.settings.video_code }}">
<img class="play-button" src="//cdn.shopify.com/s/files/1/2602/4064/t/2/assets/play-button.png">
<section class="testimonial1 angle-bigarrow">
<div class="row">
<div class="small-12 column">
<ul class="grid-1 wow fadeInUp">
{% for block in section.blocks %}
<li {{ block.shopify_attributes }}>
<div class="testimonial-inner">
<img src="{{ block.settings.image | img_url: '150x150' }}" alt="slider" />
<h5>{{ block.settings.testimonial_author }}</h5>
<p>{{ block.settings.testimonial_desc }}</p>
@keithgreer
keithgreer / deploy.php
Last active December 23, 2021 10:24 — forked from nichtich/README.md
How to automatically deploy from GitHub - https://keithgreer.dev/git-automatically-deploy-website-github
<?php
// Forked from https://gist.github.com/1809044
// Available from https://keithgreer.uk/git-automatically-deploy-website-github
// Check if client is allowed
$allowed_ips = array(
'207.97.227.', '50.57.128.', '108.171.174.', '50.57.231.', '204.232.175.', '192.30.252.', // GitHub
'123.123.123.123' // Your own IP address
);
@keithgreer
keithgreer / import-values.php
Last active December 23, 2021 10:24
M1: Import Values to Dropdown/Multiple Select Attributes - https://keithgreer.dev/import-values-to-dropdownmultiple-select-attributes
<?php
require_once '../app/Mage.php';
umask(); Mage::app('default');
$_manufacturers = file('import.txt');
$_attribute = Mage::getModel('eav/entity_attribute')->loadByCode('catalog_product','manufacturer');
$manufacturers = array('value'=> array(),'order'=> array(),'delete'=> array());
$i = 0;
@keithgreer
keithgreer / batch-sku-update.php
Last active December 23, 2021 10:24
Magento 1: Batch importer for Magento Product SKUs - https://keithgreer.dev/batch-importer-for-magento-product-skus
<?php
ini_set('error_reporting', E_ALL);
// Location of Mage.php relative to current script
include_once 'app/Mage.php';
Mage::app();
// Location of CSV relative to file system root
$updates_file="/magento/var/import/sku2sku.csv";
@keithgreer
keithgreer / functions.php
Last active December 23, 2021 10:24
WordPress: Rename "Posts" to something else in Admin - https://keithgreer.dev/rename-wordpress-posts-admin
<?php
// Rename posts in the admin menu
function update_post_label() {
global $menu;
global $submenu;
$submenu['edit.php'][5][0] = 'Story';
$submenu['edit.php'][10][0] = 'Add Story';
$submenu['edit.php'][16][0] = 'Story Tags';
$menu[5][0] = 'Stories';
{%- unless template == 'index' or template == 'cart' or template == 'list-collections' or template == '404' -%}
{%- assign t = template | split: '.' | first -%}
<nav class="breadcrumbs" role="navigation" aria-label="breadcrumbs">
<ol class="breadcrumbs__list">
<li class="breadcrumbs__item">
<a class="breadcrumbs__link" href="/">Home</a>
</li>
{%- case t -%}
{%- when 'page' -%}
@keithgreer
keithgreer / numeric-country-code.php
Last active December 23, 2021 09:59
This code maps ISO 3166-1 alpha-2 country codes to their ISO 3166-1 numeric three-digit equivalents https://keithgreer.dev/global-payments-sca-3d-secure-2
/*
* Usage: $countries['GB'] will return "826", the UK's ISO 3166-1 numeric three-digit code.
*/
$countries = [
'AF' => '004',
'AX' => '248',
'AL' => '008',
'DZ' => '012',
'AS' => '016',
@keithgreer
keithgreer / telephone-country-codes.php
Last active December 23, 2021 09:59
Mapping international dialing codes to ISO 3166-1 alpha-2 country codes - https://keithgreer.dev/global-payments-sca-3d-secure-2
/*
* Usage: $calling_codes['GB'] will return "44", the UK's dialing code.
*/
$calling_codes = [
'BD' => '880',
'BE' => '32',
'BF' => '226',
'BG' => '359',
'BA' => '387',
@keithgreer
keithgreer / old.gitignore
Last active April 3, 2019 10:59
Old version of .gitignore for Magento
#---------------------------------------------------------------------#
# Magento Default Files #
# https://github.com/github/gitignore/blob/master/Magento.gitignore #
#---------------------------------------------------------------------#
/app/etc/local.xml
/media/*
!/media/.htaccess