Skip to content

Instantly share code, notes, and snippets.


Matt Bailey matt-bailey

View GitHub Profile
matt-bailey / async-and-conditional-css-loading.html
Last active Mar 17, 2021
A simple script (based on one by Google) for loading CSS files asynchronously and conditionally based on body tag classes
View async-and-conditional-css-loading.html
<!-- Inlined critical styles -->
<!-- CSS loader -->
/* ==========================================================================
Load CSS asynchronously and conditionally after initial painting
matt-bailey /
Last active Mar 17, 2021
How to set up DNS records on to use a custom domain on Github Pages

How to set up DNS records on to use a custom domain on Github Pages

You would think it would be easy to find this information, but none of the Github or Gandi documentation is clear so I have recorded the required steps here.

Create the following A records:

@ 1800 IN A
@ 1800 IN A
@ 1800 IN A
matt-bailey / customer_account.xml
Last active Nov 10, 2020
Disable My Account sidebar links in Magento 2
View customer_account.xml
<?xml version="1.0"?>
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
<page xmlns:xsi="" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<!-- Remove unwanted account navigation links -->
matt-bailey / gist:3911666
Created Oct 18, 2012
Sass vs Less - Placeholders
View gist:3911666
// Source:
// Sass
border-top: 1px solid black
@extend %separator
@extend %separator
View gist:a332fa1e9afb908aedd52c089e81cb3d
Adyen Test Card Numbers
These cards are only valid on our TEST system and they will never involve any actual transaction or transfer of funds. The TEST card numbers will not work on the Adyen LIVE Platform.
For all cards use the following expiration and CVV2/CVC2/or CID for Amex.
For all cards:
Expiration Dates CVV2 / CVC3 CID (American Express)
08/2018 OR 10/2020 737 7373
matt-bailey / gist:5815536
Created Jun 19, 2013
The 'watch' task in Gruntfile.js (as scaffolded by yo webapp)
View gist:5815536
yeoman: yeomanConfig,
watch: {
coffee: {
files: ['<%= %>/scripts/{,*/}*.coffee'],
tasks: ['coffee:dist']
coffeeTest: {
files: ['test/spec/{,*/}*.coffee'],
tasks: ['coffee:test']
View gist:2497771
/* H5BP image replacement: */
.ir {
font: 0/0 a;
text-shadow: none;
color: transparent;
matt-bailey / .stencil
Last active Jun 21, 2019
Example BigCommerce .stencil file
View .stencil
"normalStoreUrl": "[store-url]",
"port": 3000,
"clientId": "[client-id]",
"accessToken": "[access-token]",
"customLayouts": {
"brand": {},
"category": {},
"page": {
matt-bailey / formstack-embed-using-postscribe.html
Created Sep 13, 2017
Embed a Formstack form asynchronously, using Postscribe
View formstack-embed-using-postscribe.html
<!-- Main form wrapper, required for styling the form -->
<div class="webform">
<!-- Empty div (must have a unique ID), into which the form will be loaded -->
<div id="formstack-bridal-appointment"></div>
<script type="text/javascript">// <![CDATA[
// Only run the code below when jQuery says the document is ready
(function($) {
// Process the form using postscribe:
// 1. Must reference the unique ID of the div above
matt-bailey /
Last active Oct 7, 2018
Example Magento 2 setup:install command
php bin/magento setup:install --base-url= --db-host=localhost --db-name=mysite --db-user=root --admin-firstname=Magento --admin-lastname=User --admin-user=admin --admin-password=password123 --language=en_GB --currency=GBP --timezone=Europe/London --use-rewrites=1 --backend-frontname=admin