Skip to content

Instantly share code, notes, and snippets.

View georgecrawford's full-sized avatar

George Crawford georgecrawford

View GitHub Profile
@georgecrawford
georgecrawford / index.html
Created December 12, 2018 10:08
j3t Parcel bundle analysis
<!DOCTYPE html>
<html>
<head>
<title>FoamTree Quick Start</title>
<meta charset="utf-8" />
</head>
<body>
@georgecrawford
georgecrawford / SketchSystems.spec
Last active July 24, 2018 22:16
Team Create Form
Team Create Form
Inactive
focus -> Active
Active
reset -> Inactive
Empty
type -> Completed
blur -> Inactive
@georgecrawford
georgecrawford / Letter to MPs.txt
Created January 26, 2017 19:47
A C Grayling talk on Brexit
Dear MP,
I am sure - for reasons set out below - that you will not mind my writing to you again about the following:
(1) The EU referendum of 23 June 2016 was advisory, non-binding, non-mandating, and explicitly so: Briefing Note 07212 issued to you on 3 June 2016, and which you very carefully read in preparation for debating the Referendum Bill, made this crystal clear (§5). It also explicitly pointed out (§6) that if there were to be any suggestion otherwise, that a supermajority would be required because of the major degree of constitutional change, and deprivation of citizens’ rights, that would be involved in a decision to leave the EU.
(2) The vote on the day represented 37% of the total electorate enfranchised for the poll – an electorate that excluded 16-17 year olds, a large class of expatriates, and those of our fellow EU citizens who live in the UK and pay their taxes here (‘no taxation without representation’: you allowed EU citizens to vote in the Scottish referendum of 2014 - and 16-17 year o
@georgecrawford
georgecrawford / postcss-remove-important.js
Last active December 8, 2017 21:22
description: "PostCSS plugin to remove any `!important` declarations from all rules"
import * as postcss from 'postcss';
module.exports = postcss.plugin('postcss-remove-important', (options = {}) => {
return css => {
css.walkDecls(decl => {
decl.important = false;
});
};
});
{'message': 'There have been too many calls from this ad-account. Wait a bit and try again.: There have been too many calls from this ad-account. Wait a bit and try again.', 'level': 'ERROR'},
{'message': "Sorry, HTML Cannot be Read: We're working to fix it. Please try again.", 'level': 'ERROR'},
{'message': "Sorry, HTML Cannot be Read: We're working to fix it. Please try again.", 'level': 'ERROR'},
{'message': "Sorry, HTML Cannot be Read: We're working to fix it. Please try again.", 'level': 'ERROR'},
{'message': "Sorry, HTML Cannot be Read: We're working to fix it. Please try again.", 'level': 'ERROR'},
{'message': "Sorry, HTML Cannot be Read: We're working to fix it. Please try again.", 'level': 'ERROR'},
{'message': "Sorry, HTML Cannot be Read: We're working to fix it. Please try again.", 'level': 'ERROR'},
{'message': "Sorry, HTML Cannot be Read: We're working to fix it. Please try again.", 'level': 'ERROR'},
{'message': "Sorry, HTML Cannot be Read: We're working to fix it. Please try again.", 'l
@georgecrawford
georgecrawford / raven-express-context-errorhandler.js
Last active July 15, 2016 11:47
description: "An error handler for Express/Raven which adds additional fields (tags, extra) set on the error object"
const raven = require('raven');
module.exports = client => (err, req, res, next) => {
const status = err.status || err.statusCode || err.status_code || 500;
// skip anything not marked as an internal server error
if(status < 500) return next(err);
const kwargs = raven.parsers.parseRequest(req);
@georgecrawford
georgecrawford / index.html
Last active January 6, 2016 15:46
staleElementRetry in v4.0
<!DOCTYPE html>
<html>
<head>
<title>Webdriverio Testpage</title>
</head>
<body>
<header>
<h1>Webdriverio Testpage</h1>
</header>
@georgecrawford
georgecrawford / gist:320a7e2215e280452c7e
Last active August 29, 2015 14:13
Promise.all ignoring errors
// Reject if every promise fails, otherwise resolve
// with the values which resolved, ignoring errors.
// Inspired by https://github.com/slightlyoff/ServiceWorker/issues/359
function allThatResolve(promises) {
var results = [],
seen = 0,
length = promises.length;
function done(resolve, reject) {
seen++;
@georgecrawford
georgecrawford / SassMeister-input.scss
Created May 22, 2014 15:06
Generated by SassMeister.com.
// ----
// Sass (v3.3.7)
// Compass (v1.0.0.alpha.18)
// ----
@mixin smallscreen() {
// landscape, width < 599, ensuring device is landscape and not portrait with keyboard open
@media all and (orientation: landscape) and (max-width: 599px) and (min-device-aspect-ratio: 1/1),
@georgecrawford
georgecrawford / SassMeister-input.scss
Created May 6, 2014 09:50
Generated by SassMeister.com.
// ----
// Sass (v3.3.6)
// Compass (v1.0.0.alpha.18)
// ----
%highlight-focus-state {
box-shadow: red;
}
%highlight-focus-state-webkit {