Skip to content

Instantly share code, notes, and snippets.

Florian Motlik flomotlik

Block or report user

Report or block flomotlik

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
@flomotlik
flomotlik / Dockerfile
Created Sep 18, 2017
AWSGit for pushing to CodeCommit
View Dockerfile
FROM alpine:latest
RUN apk add --no-cache --update \
python \
python-dev \
py-pip \
build-base \
git
RUN pip install awscli
@flomotlik
flomotlik / service-checklist.md
Created Mar 20, 2017 — forked from acolyer/service-checklist.md
Internet Scale Services Checklist
View service-checklist.md

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?
@flomotlik
flomotlik / functions.sh
Created Sep 28, 2016
Pull Request handling
View functions.sh
# Checkout a PR from the current repo
function copr { git fetch origin pull/$1/head:pr-$1; git checkout pr-$1; }
# Get the current PR from the branch name
function current_pr {
git rev-parse --abbrev-ref HEAD | grep -oE "\d+"
}
# Update the PR
function upr {
View something.md

Setting the AWS API Key & Secret

To start using Serverless and access the AWS API you need to set the AWS API Access Key & Secret.

Quick Setup

As a quick setup to get started you can export them as environment variables so they will be accessible to Serverless and the AWS SDK in your shell:

export AWS_ACCESS_KEY_ID=<key>
export AWS_SECRET_ACCESS_KEY=<secret>
View HookPlugin.js
module exports = class SomePlugin extends ServerlessPlugin{
//Contructor should be defined in ServerlessPlugin so you don't have to recreate it here
constructor(pluginConfig, serverlessConfig, serverlessUtils) {
this.pluginConfig = pluginConfig;
this.serverlessConfig = serverlessConfig;
this.serverlessUtils = serverlessUtils;
}
beforeDeployResources(params) {
@flomotlik
flomotlik / Public_Key.asc
Created Jul 20, 2015
Codeship PGP Public Key
View Public_Key.asc
-----BEGIN PGP PUBLIC KEY BLOCK-----
Comment: GPGTools - https://gpgtools.org
mQINBFWstgkBEADCEqXKz83rIAK6VLaaqNJ09RNcTxMW0eOJu12/5bthFXnhVOQb
B1n4UMFxlHAFK9IOXwfmMsU4z8z8I7oDlfkRRyGRoQAoxuUuxYZTeWnGFktnRtRQ
G3SXzXmLkIgajd7jksPzQxySWf4/4CUa2DiyUhm0vhC/63BGRxf6uU9Vn9FwRg+o
cqeXHWdffvbcguAJe2aFCHHAg4fS0usiqTPPHhCWaOicmoJ0HjkWmWDJB8Mq/b1C
EQL/tsMBBfMo2TsolBWYoYvqEaeGO7N2Dj/leHq0JjN60pLV4Ggnq3RXqHvFX+4r
B7bg9tBi5fCSHNYFpF5/9+rya8M5wvJvfZqfS36K0ft4La8orb/8MizQdCveP/xG
r8CkpWrxRGNmcUETVZZl8StCnEIW7ONYAdScjDv/SFhzhuz+XvNZuvwFtUsU4LmZ
View docker_cleanup.bashrc
function docker_cleanup {
# Find all containers that have exited
containers=`docker ps -a -q | xargs`
if [[ $containers ]]; then
# Remove exited containers
docker stop $containers
docker rm $containers
else
echo "No containers to remove"
fi
@flomotlik
flomotlik / debrief-template
Last active May 5, 2016
Codeship Debrief Template
View debrief-template
# Service Interruption Debrief
## Brief Executive Summary
EXECUTIVE SUMMARY HERE
***On Call during outage***:
***Time outage started***:
View CodeDeploy Policy
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"codedeploy:RegisterApplicationRevision",
"codedeploy:GetApplicationRevision"
],
"Resource": [
@flomotlik
flomotlik / CodeDeploy policy
Last active Aug 29, 2015
CodeDeploy policies
View CodeDeploy policy
#Link to CodeDeploy IAM details: http://docs.aws.amazon.com/codedeploy/latest/userguide/access-permissions.html
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"codedeploy:RegisterApplicationRevision",
You can’t perform that action at this time.