Skip to content

Instantly share code, notes, and snippets.

View triblondon's full-sized avatar

Andrew Betts triblondon

View GitHub Profile
@triblondon
triblondon / Gruntfile.js
Created January 29, 2014 13:05
Sample Grunt config for Origami compliant build process
module.exports = function(grunt) {
"use strict";
grunt.initConfig({
sass: {
docs: {
options: {
style: 'compressed',
loadPath: './bower_components'
},
@triblondon
triblondon / .travis.yml
Last active August 29, 2015 13:57
Travis CI config for Origami projects
language: node_js
node_js:
- "0.10"
before_install:
- npm install -g https://github.com/Financial-Times/origami-build-tools/tarball/node-0.10
- origami-build-tools install
script:
- origami-build-tools test
@triblondon
triblondon / SassMeister-input.scss
Created March 27, 2014 23:19
Generated by SassMeister.com.
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// ----
/* So our dependency tree looks like:
- ModuleB
- ModuleA
- UserAgent
@triblondon
triblondon / .scss-lint.yaml
Last active August 29, 2015 14:01
Proposed scss-lint rules
linters:
# ENABLED:
# "border: 0" not "border: none"
BorderZero:
enabled: true
# No capitals in selectors
CapitalizationInSelector:
@triblondon
triblondon / README.md
Last active August 29, 2015 14:13
Edge conf 5: London 2015

#Early draft of Edge conf 5

This was a discussion of the schedule for Edge 5, which is now finalised, and the information below is out of date. See the website for current details.

##Format

Edge 5 will feature a single track of 4 sequential panel discussions on topics of universal importance and topicality to the web community, followed by lunch and then 12 breakout sessions across 4 tracks, in which face to face discussions of specific current and future web topics can be had in boardroom style with groups of up to 50.

@triblondon
triblondon / keybase.md
Created May 27, 2015 07:36
keybase.md

Keybase proof

I hereby claim:

  • I am triblondon on github.
  • I am triblondon (https://keybase.io/triblondon) on keybase.
  • I have a public key whose fingerprint is 499E 3F7D 72A6 1EFE B9AF 3789 7237 0952 AC58 BFA9

To claim this, I am signing this object:

@triblondon
triblondon / gist:5530fb06586a090ec67d
Created July 8, 2015 14:03
Template strings tag function
function makeTagFunction(fn) {
return (literals, ...substitutions) => {
return literals.map((str, idx) => {
return str + ((idx in substitutions) ? fn(substitutions[idx]) : '');
}).join('');
}
}
let a = 5;
let b = 10;
@triblondon
triblondon / 1-timertest.js
Last active November 1, 2015 23:24
Weird Node error when using mismatched setInterval vs clearTimeout
var timer;
function a() {
console.log('foo');
// timer is an interval timer, but clear it as if it's a timeout timer
clearTimeout(timer);
}
@triblondon
triblondon / page.html
Last active January 3, 2016 03:08
Recommended Origami JavaScript loader
<script>
(function() {
if (Modernizr.classlist && Modernizr.queryselector && Modernizr.localstorage && Modernizr.eventlistener) {
var j = document.createElement('script');
j.type = 'text/javascript';
j.async = true;
j.src = '/resources/javascript/bundle.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(j, s);
} else {
@triblondon
triblondon / SassMeister-input.scss
Created January 15, 2014 23:43
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
$o-colors-is-silent: true !default;
$colorList:
pink #fff1e0,
black #000000,