Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View xzyfer's full-sized avatar

Michael Mifsud xzyfer

View GitHub Profile
@xzyfer
xzyfer / surrogate-keys-recommendation.md
Created February 26, 2016 00:02
Surrogate Keys Recommendation

Surrogate Keys

The fastly article on the topic does a great job of explaining what surrogate keys are. I suggest familiarising yourself with it before continuing.

TLDR; the Surrogate Keys response header is a space delimited list of "tags" for that given response.

Why

Using surrogate keys we can more precisicely purge specific sets of reponses from the fastly cache. For exmaple we could choose to purge all CMS template, or CMS resource centre templates, or simply all CMS pages with a single column upsell element.

@xzyfer
xzyfer / about.md
Created February 23, 2016 00:24
metalsmith workflow
layout title
main.hbs
About

About

src/pages/linters/index.md

@xzyfer
xzyfer / SassMeister-input.scss
Created January 22, 2016 00:08
Generated by SassMeister.com.
// ----
// Sass (v3.4.20)
// Compass (v1.0.3)
// ----
@mixin using-at($parent) {
#{$parent}[data-foo] & {
foo: bar
}
}
@xzyfer
xzyfer / SassMeister-input.scss
Created January 22, 2016 00:04
Generated by SassMeister.com.
// ----
// Sass (v3.4.20)
// Compass (v1.0.3)
// ----
@mixin using-at($parent:"parent") {
#{$parent}[data-foo] & {
foo: bar
}
}
@xzyfer
xzyfer / SassMeister-input.scss
Last active January 22, 2016 00:03
Generated by SassMeister.com.
// ----
// Sass (v3.4.20)
// Compass (v1.0.3)
// ----
@mixin using-at($parent:"parent") {
#{$parent}[data-foo] & {
foo: bar
}
}
@xzyfer
xzyfer / SassMeister-input.scss
Created January 4, 2016 04:24
Generated by SassMeister.com.
// ----
// Sass (v3.4.20)
// Compass (v1.0.3)
// ----
.multi-column__via-row {
display: block;
}
.multi-column__via-column {
display: none;
@xzyfer
xzyfer / SassMeister-input.scss
Created December 28, 2015 02:30
Generated by SassMeister.com.
// ----
// libsass (v3.3.2)
// ----
div {
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='32' height='24' viewBox='0 0 32 24'><polygon points='0,0 32,0 16,24' style='fill: rgb%2851, 51, 51%29'></polygon></svg>");
}
@xzyfer
xzyfer / SassMeister-input.scss
Created December 27, 2015 06:56
Generated by SassMeister.com.
// ----
// libsass (v3.3.2)
// ----
.bar {
color: green;
}
.foo {
@extends .bar;
@xzyfer
xzyfer / SassMeister-input.scss
Created November 24, 2015 00:00
Generated by SassMeister.com.
// ----
// Sass (v3.4.14)
// Compass (v1.0.3)
// ----
$foo: ("shadows": (
"slim-shady": (0 0 5px 0 rgba(0,0,0,0.1), 0 3px 6px 0 rgba(0,0,0,0.2)),
"dj-shadow": (0 0 5px 0 rgba(0,0,0,0.1), 0 6px 20px 0 rgba(0,0,0,0.3)),
));
@xzyfer
xzyfer / SassMeister-input.scss
Created October 7, 2015 10:10
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
$gutters: 1/5;
a { b: $gutters; }