Skip to content

Instantly share code, notes, and snippets.

Tom Maslen tmaslen

View GitHub Profile
View gist:bf849f23b737364d9ca52b78161f9a7d
git fetch origin
git rebase origin/master
git status
git add .
git status
git rebase --continue
git status
git add .
git status
git rebase --continue

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
You can’t perform that action at this time.