View mocha.d.ts
type Callback = () => void;
export function describe(description: string, callback: Callback);
export function it(description: string, callback: Callback);
# Adapted from...
View serverless-creation-iam-policy.json
"Version": "2012-10-17",
"Statement": [
"Action": [
View Lambda-ApiGateway-Cloudformation.json
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "AWS CloudFormation sample template that contains a single Lambda function behind an API Gateway",
"Resources": {
"GreetingLambda": {
"Type": "AWS::Lambda::Function",
"Properties": {
View dedupeInlineCSS.js
var _ = require( 'lodash' );
module.exports = function ( html ) {
var anyInlineCssTag = new RegExp( '<style type="text/css">[^<]*</style>', 'g' );
var matches = html.match( anyInlineCssTag );
_.uniq( matches ).forEach( function( styleTag ) {
View gist:cd74dcaecbc3e8f4c262067c89e3ad1b
# Create a temp file that runs install instructions on the host
cat > <<- EOM
rm -fr
unzip -d
# Zip up and deploy the code and the install script
View BBC News JavaScript Standard

# BBC News JavaScript Standard v0.0


  • Introduction
  • Ensuring availability of JavaScript content for all users
  • JavaScript coding strategies
  • Legal requirements
  • Implementation and optimisation
  • XML HTTP Requests (AJAX)
View hint-example.js
function init () {
function( callback ) {
firstFunction( callback );
function( callback ) {
secondFunction( callback );
View gist:4a2747d272f81159d206

My nan used to always cheat at Scrabble. I know this because she always used to help me win. She stopped cheating to help me about 10 years ago when I won without her help. I murdered the competition during that game, beating my sister, my mum and my nan by at least 100 points. From that day on nan always cheated to help the people I was playing against.

My nan always used to comment on my appearance. One year when I was growing my hair long each time I saw her she would tell me I looked scruffy. That I should get my hair cut short just like my granddad's. But when I did eventually get my hair cut she took one look at it and said "What you get your haircut for? I liked it the way it was".

My nan always used to tell me what to eat. She treated my being a vegetarian with great suspicion. Every week when I would take her shopping she'd try to tempt me with varying different kinds of meats from ASDA's deli section. And when she would cook for me on a Friday lunchtime she'd always offer to put an extr