Skip to content

Instantly share code, notes, and snippets.

View mblode's full-sized avatar

Matthew Blode mblode

View GitHub Profile
@monachilada
monachilada / gatsby-config.js
Last active October 16, 2020 19:03
Sample gatsby-config.js enabling live preview in Craft CMS
const { createHttpLink } = require('apollo-link-http');
const fetch = require('node-fetch');
const store = require('store');
const sourceNodes = require('gatsby/dist/utils/source-nodes');
require('dotenv').config();
const craftGqlUrl = process.env.CRAFT_GQL_URL;
const craftGqlToken = process.env.CRAFT_GQL_TOKEN;
module.exports = {
import axios from 'axios';
// my vuex store
import store from './../store';
axios.defaults.withCredentials = true;
const apiVersion = 'v1';
const apiClient = axios.create({
baseURL: 'https://XYZ/api/' + apiVersion + '/',
headers: {
Accept: 'application/json',
@jacobmllr95
jacobmllr95 / imagick3.4.3-PHP7.1-forge.sh
Last active November 28, 2019 01:43 — forked from pascalbaljet/imagick-3.4.0-PHP7-forge.sh
Install Imagick 3.4.3 on PHP 7.1 server (Laravel Forge)
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
apt-get install pkg-config libmagickwand-dev -y
cd /tmp
wget https://pecl.php.net/get/imagick-3.4.3.tgz
tar xvzf imagick-3.4.3.tgz
@RayPS
RayPS / Framer-Design-At-1x.coffee
Last active March 4, 2018 13:04
Framer Design At 1x
is_iPhone = Framer.Device.deviceType.includes "apple-iphone"
is_iPhonePlus = Framer.Device.deviceType.includes "plus"
is_iPhoneNotPlus = is_iPhone and not is_iPhonePlus
if is_iPhonePlus and Utils.isFramerStudio() then Framer.Device.content.scale = 3
if is_iPhoneNotPlus and Utils.isFramerStudio() then Framer.Device.content.scale = 2
document.querySelector("head>meta[name=viewport]").setAttribute "content",
"width=device-width, height=device-height, initial-scale=1, maximum-scale=1, user-scalable=no"
Framer.Device._update()