Skip to content

Instantly share code, notes, and snippets.

View mhemmings's full-sized avatar
UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS

Mark Hemmings mhemmings

UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS
View GitHub Profile
@mhemmings
mhemmings / Makefile
Last active January 9, 2021 05:40
EB Deploy Makefile
VERSION=$(shell git rev-parse --short HEAD)
DESC=$(shell git log -1 --pretty=%B)
BUCKET_NAME="your-eb-s3-bucket"
PROJECT_NAME=$(shell basename $(shell pwd))
REGION="eu-west-1"
ifndef ENV
$(error No environment ENV is defined)
endif
@mhemmings
mhemmings / gh-project-text.js
Created November 1, 2017 18:10
One line of JS to paste into the console, which puts the Github project status onto the clipboard in a simple easy to read text format
for(var name,columns=document.querySelectorAll('.project-columns-container>.project-column'),str='',i=0;i<columns.length;++i){name=columns[i].querySelector('.js-project-column-name').innerHTML,str+=`${name}\n`;for(var cards=columns[i].querySelectorAll('.project-card>div>a'),j=0;j<cards.length;j++)str+=`- ${cards[j].innerHTML.trim()}\n`;str+='\n'}copy(str);
@mhemmings
mhemmings / gh-project-text.js
Created November 1, 2017 18:11
One line of JS to paste into the console, which puts the Github project status onto the clipboard in a simple easy to read text format for Slack/emails/whatever
for(var name,columns=document.querySelectorAll('.project-columns-container>.project-column'),str='',i=0;i<columns.length;++i){name=columns[i].querySelector('.js-project-column-name').innerHTML,str+=`${name}\n`;for(var cards=columns[i].querySelectorAll('.project-card>div>a'),j=0;j<cards.length;j++)str+=`- ${cards[j].innerHTML.trim()}\n`;str+='\n'}copy(str);
@mhemmings
mhemmings / main.go
Last active February 2, 2018 14:48
Bulk create Cloudwatch alarms for 4xx/5xx API Gateway errors.
package main
import (
"fmt"
"log"
"strings"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/cloudwatch"
@mhemmings
mhemmings / main.go
Created February 2, 2018 14:46
Bulk create Cloudwatch alarms for 4xx/5xx API Gateway errors. Tweak for your needs.
package main
import (
"fmt"
"log"
"strings"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/cloudwatch"