Skip to content

Instantly share code, notes, and snippets.

@mweagle
mweagle / principles.dot
Last active July 29, 2022 20:08
The 5 Principles of Human Performance
graph principlesofperformance {
# Source material:
#
# This graph depends on the following font
# https://fonts.google.com/specimen/Gochi+Hand?query=gochi
#
# This graph depends on the following icons existing in the ./images subpath
# https://www.flaticon.com/free-icon/angry_135809?term=angry&page=1&position=23&page=1&position=23&related_id=135809&origin=style -> angry.png
# https://www.flaticon.com/premium-icon/cast_3000085?term=broken%20arm&page=1&position=1&page=1&position=1&related_id=3000085&origin=style -> brokenarm.png
# https://www.flaticon.com/free-icon/five-stars_6302869?term=star&page=1&position=26&page=1&position=26&related_id=6302869&origin=style -> five.png

Overview

Queries to save as JIRA filters to bootstrap a new project.

JIRA queries

Kanban board query:

project = _YOUR-PROJECT-NAME_ AND status != Closed AND issuetype = Epic ORDER BY priority DESC, updatedDate DESC
@mweagle
mweagle / main.go
Created August 24, 2019 01:13
Code for Serverless Day Challenge on AWS Twitch
package main
import (
"context"
"os"
"time"
gocf "github.com/mweagle/go-cloudformation"
"github.com/aws/aws-sdk-go/aws"
@mweagle
mweagle / design_doc_template.md
Created January 9, 2019 00:30
Design Document Template

Design Document

Design Document Template Title: Date: Status: (draft, in review, approved, in progress)

Executive Summary

(2–4 sentences explaining the project)

@mweagle
mweagle / provision.log
Created October 21, 2018 04:00
Hello World Sparta Provision
$ mage provision
INFO[0000] ════════════════════════════════════════════════
INFO[0000] ╔═╗╔═╗╔═╗╦═╗╔╦╗╔═╗ Version : 1.5.0
INFO[0000] ╚═╗╠═╝╠═╣╠╦╝ ║ ╠═╣ SHA : bdfb9d6
INFO[0000] ╚═╝╩ ╩ ╩╩╚═ ╩ ╩ ╩ Go : go1.11.1
INFO[0000] ════════════════════════════════════════════════
INFO[0000] Service: MyHelloWorldStack-mweagle LinkFlags= Option=provision UTC="2018-10-21T03:59:20Z"
INFO[0000] ════════════════════════════════════════════════
INFO[0000] Using `git` SHA for StampedBuildID Command="git rev-parse HEAD" SHA=b114e329ed37b532e1f7d2e727aa8211d9d5889c
INFO[0000] Provisioning service BuildID=b114e329ed37b532e1f7d2e727aa8211d9d5889c CodePipelineTrigger= InPlaceUpdates=false NOOP=false Tags=
@mweagle
mweagle / pipeline.yml
Created May 25, 2016 14:11
Concourse CI pipeline for http://gosparta.io application build
################################################################################
# REFERENCES
# ConcourseCI Docs: https://concourse.ci
# Concourse tutorial: https://github.com/starkandwayne/concourse-tutorial
#
# NOTES
# This file is a self-contained description of a Concourse CI pipeline
# to deploy a http://gosparta.io application. There's a couple of things to
# note:
# - The YAML uses node references so that scripts can be defined in the
INFO[0000] ════════════════════════════════════════════════
INFO[0000] ╔═╗┌─┐┌─┐┬─┐┌┬┐┌─┐ Version : 1.0.1
INFO[0000] ╚═╗├─┘├─┤├┬┘ │ ├─┤ SHA : 840ab43
INFO[0000] ╚═╝┴ ┴ ┴┴└─ ┴ ┴ ┴ Go : go1.9.2
INFO[0000] ════════════════════════════════════════════════
INFO[0000] Service: SpartaHTML-mweagle LinkFlags= Option=provision UTC="2018-01-22T02:34:47Z"
INFO[0000] ════════════════════════════════════════════════
INFO[0000] Provisioning service BuildID=d64f878f9a00d1300e3c8f2ec60cff856487de61 CodePipelineTrigger= InPlaceUpdates=false NOOP=false Tags=
INFO[0000] Verifying IAM Lambda execution roles
INFO[0000] IAM roles verified Count=1
// Deploy it
stackName := spartaCF.UserScopedStackName("SpartaHTML")
sparta.Main(stackName,
fmt.Sprintf("SpartaHTML provisions a static S3 hosted website with an API Gateway resource backed by a custom Lambda function"),
spartaHTMLLambdaFunctions(apiGateway),
apiGateway,
s3Site)
if nil != api {
apiGatewayResource, _ := api.NewResource("/hello", lambdaFn)
// We only return http.StatusOK
apiMethod, apiMethodErr := apiGatewayResource.NewMethod("GET",
http.StatusOK,
http.StatusOK)
if nil != apiMethodErr {
panic("Failed to create /hello resource: " + apiMethodErr.Error())
}
// Register the function with the API Gateway
apiStage := sparta.NewStage("v1")
apiGateway := sparta.NewAPIGateway("SpartaHTML", apiStage)
// Enable CORS s.t. the S3 site can access the resources
apiGateway.CORSOptions = &sparta.CORSOptions{
Headers: map[string]interface{}{
"Access-Control-Allow-Headers": "Content-Type,X-Amz-Date,Authorization,X-Api-Key",
"Access-Control-Allow-Methods": "*",
"Access-Control-Allow-Origin": gocf.GetAtt(s3Site.CloudFormationS3ResourceName(), "WebsiteURL"),
},