Skip to content

Instantly share code, notes, and snippets.

View thisislawatts's full-sized avatar

Luke Watts thisislawatts

View GitHub Profile
@thisislawatts
thisislawatts / index.liquid
Created May 31, 2015 15:45
Shopify - Adding a slideshow to the homepage
{% if settings.homepage_slideshow %}
<section id="HomepageSlideshow" class="homepage--slideshow">
<ul class="slides">
{% if settings.homepage_slide_show_1 %}
<li data-id="1">
<img src="{{ 'homepage_slide_image_1.jpg' | asset_url }}" alt="{{ settings.homepage_slide_title_1 }}"/>
<a href="{{ settings.homepage_slide_title_1 }}" class="vac">
<h1>{{ settings.homepage_slide_title_1 }}</h1>
<h2>{{ settings.homepage_slide_text_1 }}</h2>
</a>
@thisislawatts
thisislawatts / update.php
Last active May 25, 2021 02:54
Force database upgrade
<?php
class acf_update {
/*
* __construct
*
* A good place to add actions / filters
*
* @type functionac
@thisislawatts
thisislawatts / swagger.yml
Last active November 19, 2017 17:25
Vertoe FYA integration
swagger: '2.0'
info:
description: >-
This is a sample of how Vertoe could integrate with FYA. Using the Swagger
spec, find out more at [http://swagger.io](http://swagger.io) or on
[irc.freenode.net, #swagger](http://swagger.io/irc/)
version: 1.0.0
title: FYA with Vertoe
contact:
email: luke@thisis.la
@thisislawatts
thisislawatts / ftl.js
Created July 13, 2017 13:00
Copy fractal components across to Shopify Theme snippets/
/* */
const fs = require("fs");
const recursive = require("recursive-readdir");
recursive(__dirname + "/src/components/", [
"preview.liquid",
".DS_Store",
"*.json"
]).then(files => {
@thisislawatts
thisislawatts / acfphp2json.php
Last active June 8, 2017 20:25
Convert ACF php files to ACFJSON
<?php
function convert_ACF_PHP_2_Json() {
$status = [];
$theme_dir = get_stylesheet_directory();
$json_output_dir = $theme_dir . '/acf-json/';
if (!file_exists($json_output_dir)) {
die('Create a acf-json/ directory in your current theme.');
<p>We offer the opportunity to develop your career in a sociable, design driven practice, working on prestigious projects for
well-known clients. Pitman Tozer Architects is a great place to work, with a growing studio of 20 and an office move to
Marylebone planned in April 2017. We offer a number of benefits including pension contributions and annual office trip
abroad. </p>
<p>We are currently recruiting for the following:</p>
<p>Part-time graphic designer<br>
<br> We are seeking a talented graphic designer to join our growing London design studio on a part time basis of three
days a week.</p>
@thisislawatts
thisislawatts / Description.html
Last active April 3, 2017 10:03
Flags for BRM
<!-- Insert the following before the French text -->
<img width="15" src="//hosted.bcmh.build/basecamp/assets/flag-fr.svg"/><br/>
<!-- Insert the following before the English text -->
<br/><img width="15" src="//hosted.bcmh.build/basecamp/assets/flag-gb.svg"/><br/>
@thisislawatts
thisislawatts / tidy.php
Last active March 28, 2017 07:24
Single file tidy up for WordPress
<?php
/**
* WordPress tidy up
*
*/
remove_action( 'wp_head', 'feed_links', 2 );
remove_action( 'wp_head', 'feed_links_extra', 3 );
php %home%\site\wwwroot\artisan schedule:run
@thisislawatts
thisislawatts / blog.json
Last active November 8, 2016 14:37
Blimp Blog JSON Output
{
"posts" : [
{
"date" : "",
"title" : "",
"media" : [{}],
"link" : "",
"size" : 1
}
]