Skip to content

Instantly share code, notes, and snippets.

@maddiesch
maddiesch / Makefile
Last active July 17, 2023 15:04
Golang Makefile for SAM project
GOLANG := go
GOLANG_TEST_FLAGS ?= -v
GOLANG_TEST_RUN ?= .
GOLANG_TEST_PATH ?= ./...
GO_LAMBDA_ENV ?= GOOS=linux GOARCH=arm64
GO_LAMBDA_BUILD_FLAGS ?= -ldflags="-s -w" -tags "lambda.norpc"
GO_LAMBDA_BUILD ?= ${GO_LAMBDA_ENV} ${GOLANG} build ${GO_LAMBDA_BUILD_FLAGS}
GO_FILES := $(shell find . -type f -name '*.go' ! -name '*_test.go')
GO_TEST_FILES := $(shell find . -type f -name '*_test.go')

Keybase proof

I hereby claim:

  • I am maddiesch on github.
  • I am maddiesch (https://keybase.io/maddiesch) on keybase.
  • I have a public key ASB_3FY7wHHMvDrCf_E5f9jEMUZfFScfUUEJNRMqDxf6YQo

To claim this, I am signing this object:

@maddiesch
maddiesch / Makefile
Last active November 19, 2020 06:31
Basic Golang & SAM Makefile
# Configuration
SAM_ARTIFACT_BUCKET := <artifact-bucket-name>
SAM_STACK_NAME := <sam cloudformation stack name>
SAM_DEPLOY_CAPABILITIES := CAPABILITY_IAM
SAM_TEMPLATE_PARAMETERS :=
export AWS_PROFILE := default
ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
.PHONY: build
function __git_prompt () {
if ! git rev-parse --git-dir > /dev/null 2>&1; then
return
fi
echo -n "%{$fg[cyan]%}($(git_current_branch))"
echo -n "%{$fg[green]%}[$(git rev-parse HEAD 2> /dev/null | head -c 6)]"
echo -n "%{$fg[cyan]%} $(parse_git_dirty)$(git_remote_status)"
echo -n "%{$reset_color%}"
}
@maddiesch
maddiesch / AuroraServerless.yml
Last active February 25, 2019 03:05
Create an aurora serverless cluster.
---
Parameters:
DatabaseUsernameTemplateParameter:
Type: String
Description: The username for the database user
MaxLength: 16
Default: root
DatabasePasswordTemplateParameter:
Type: String
Description: The password for the database user

Destiny 2 Error codes

  • SNAIL
  • CHICKEN
  • DUCK
  • PONY
  • CAT
  • SHEEP
  • ELK
  • BOAR

Keybase proof

I hereby claim:

  • I am maddiesch on github.
  • I am skylarsch (https://keybase.io/skylarsch) on keybase.
  • I have a public key whose fingerprint is 0A98 EEB9 3667 76EF BFED A7FC EB5C 9CC8 F793 91D4

To claim this, I am signing this object:

@maddiesch
maddiesch / run.rb
Created August 22, 2018 20:32
Run a subcommand a set number of times
#!/usr/bin/env ruby
##
# Usage `run --number 5 b rspec`
#
#
##
require 'optparse'
require 'open3'
internal struct SystemInfo {
let sysname: String
let nodename: String
let release: String
let version: String
let machine: String
init() {
var info: utsname = utsname()
let status = withUnsafeMutablePointer(to: &info) {
@maddiesch
maddiesch / orbits.md
Last active August 13, 2017 21:40
K.I.L.L (Kerbal Interstellar Launch Logistics)

Kerbol

ComNetwork

  • GeoSyncronous - 2,863,343m

  • Deep Space 1 - 20,000,000m

Parking