Skip to content

Instantly share code, notes, and snippets.

# Varnish 4.0 file for our Craft CMS projects
# Based on https://github.com/mattiasgeniar/varnish-4.0-configuration-templates/blob/master/default.vcl
#
# This is still work in progress, comments appreciated.
vcl 4.0;
# Default backend definition. Set this to point to your content server.
backend default {
.host = "127.0.0.1";
@outhouse
outhouse / default.vcl
Last active January 8, 2016 15:46 — forked from joshangell/default.vcl
Varnish config for Craft
# Varnish 4.0 configuration for Craft
#
# Based on the following:
# - https://github.com/mattiasgeniar/varnish-4.0-configuration-templates/blob/master/default.vcl
# - https://gist.github.com/aelvan/eba03969f91c1bd51c40
vcl 4.0;
import std;
import directors;
@outhouse
outhouse / index.js
Created August 17, 2016 19:45
requirebin sketch
const choo = require('choo')
const html = require('choo/html')
const app = choo()
const pages = [
{ title : 'Content 1', content : 'This is some content for page 1', media : 'https://placeholdit.imgix.net/~text?txtsize=33&txt=Image%201&w=350&h=150', slug : 'page-1' },
{ title : 'Content 2', content : 'This is content for page 2', media : 'https://placeholdit.imgix.net/~text?txtsize=33&txt=Image%201&w=350&h=150' , slug : 'page-2' }
]
app.model({
@outhouse
outhouse / index.js
Last active August 17, 2016 21:04
requirebin sketch
const choo = require('choo')
const html = require('choo/html')
const app = choo()
const pages = [
{ title : 'Bear', content : 'I\'m a bear', media : 'http://placebear.com/600/400' , slug : '/' },
{ title : 'Kitten', content : 'Meow', media : 'http://placekitten.com/600/400' , slug : '/kitten' }
]
app.model({
@outhouse
outhouse / index.js
Created August 23, 2016 14:46
requirebin sketch
var weather = require('yahoo-weather');
var cities = [ "New York, NY", "Portland, ME", "Ocean City, NJ" ];
cities.forEach(makeCity);
function makeCity(city){
weather(city, 'f').then(info => {
console.log(info);
var forecast = info.item.forecast;
var data = {