Skip to content

Instantly share code, notes, and snippets.

<div data-section-type="cart-template">
<div class="page-header">
<h1 class="majortitle">{{ 'cart.general.title' | t }}</h1>
</div>
{% if cart.items == empty %}
<div class="row-spacing align-centre">
<p>{{ 'cart.general.empty' | t }}</p>
</div>
{% else %}
@joeainsworth
joeainsworth / navigation.liquid
Created April 18, 2018 10:18
Basic CSS Mega Nav for extending
<style>
/* MAIN NAVIGATION */
.site-nav__list {
margin: 0;
padding: 0;
text-align: center;
}
.site-nav__item {
display: inline-block;
@joeainsworth
joeainsworth / gist:91c4c36f10b398e9fed47504d776497a
Created April 9, 2018 15:54
Shipping Calculator for Shopify
{% assign country = shop.address.country %}
{% if customer.default_address %}
{% assign country = customer.default_address.country %}
{% assign zip = customer.default_address.zip %}
{% endif %}
<div class="tab shipping-calculator">
<input class="tab__input" id="tab1" type="checkbox" name="tabs" checked>
<label class="tab__label" for="tab1">Shipping Calculator</label>
import React from 'react';
import PropTypes from 'prop-types';
import DatePicker from 'react-datepicker';
import moment from 'moment';
class SocialPostDates extends React.Component {
constructor(props) {
super(props);
}
import React from 'react';
import PropTypes from 'prop-types';
class SocialAttachments extends React.Component {
constructor(props) {
super(props);
}
state = {
@joeainsworth
joeainsworth / gist:b522724f18e3f01f50b7979a9962224e
Created October 6, 2017 14:31
Install PHP7, Nginx, RVM, Ruby on Amazon Linux AMI
sudo yum groupinstall 'Development Tools'
sudo yum install nginx -y
sudo yum install php71 -y
sudo yum install php71-fpm -y
sudo nano /etc/nginx/conf.d/default.conf
sudo nano /etc/php-fpm.d/www.conf
sudo chkconfig nginx on
sudo chkconfig php-fpm-71 on
sudo service nginx start
sudo service php-fpm start
<?php
namespace Aiir\Apps\SocialPublisher\Models;
class Group
{
private $id;
private $clientId;
private $name;
<?php
namespace Aiir\Apps\SocialPublisher;
use Aiir\Apps\SocialPublisher\Models\Post as Post;
use Aiir\Apps\SocialPublisher\Models\Group as Group;
use Aiir\Apps\SocialPublisher\Models\Account as Account;
use Aiir\Apps\SocialPublisher\Models\Variable as Variable;
use Aiir\Apps\SocialPublisher\Models\AccountVariable as AccountVariable;
<?php
namespace Aiir\SocialPublisher;
class FacebookPost extends Post
{
public function publish()
{
// Specific implementation to publish post to Facebook
}
const AWS = require('aws-sdk');
const bodyParser = require('body-parser');
const config = require('./config.json');
const cors = require('cors');
const express = require('express');
const fs = require('fs-extra');
const gm = require('gm');
const Promise = require('promise');
const uuidv1 = require('uuid/v1');