Skip to content

Instantly share code, notes, and snippets.

Tom Maslen tmaslen

Block or report user

Report or block tmaslen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Project Title

One Paragraph of project description goes here


Top 5 things about this project

  • List of them
tmaslen / policy.json
Last active May 24, 2019
AWS IAM Profile with all the required permissions for deploying a Lambda + API Gateway via Cloudformation
View policy.json
"Version": "2012-10-17",
"Statement": [
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
tmaslen / mocha.d.ts
Created Nov 23, 2017
Minimum Typescript definitions for mocha.js
View mocha.d.ts
type Callback = () => void;
export function describe(description: string, callback: Callback);
export function it(description: string, callback: Callback);
# Adapted from...
tmaslen / serverless-creation-iam-policy.json
Last active Mar 16, 2017
example IAM policy for creating serverless services from the CLI
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)
You can’t perform that action at this time.