Skip to content

Instantly share code, notes, and snippets.

View sirkuttin's full-sized avatar
🐢

Kirk Sutton sirkuttin

🐢
View GitHub Profile
@sirkuttin
sirkuttin / build.sh
Last active May 17, 2023 16:28
lambda builder
#!/bin/bash
set -e
# Build Golang code in a given directory for the linux x86_64 architecture
build_golang() {
GOOS=linux GOARCH=amd64 go build -o handler
zip $build_dir/$artifact_name handler
rm handler
}
#!/usr/bin/env python3
"""Build script for creating AWS lambda function and layer artifacts.
This script generally lives in a build pipeline and will create zipfile archive
artifacts that are suitable for deployment to a lambda function or layer.
"""
from __future__ import annotations
import argparse
@sirkuttin
sirkuttin / cool.py
Last active June 5, 2020 19:47
dependency injection makes testing easier
# have a function to create the client so you can dependcy in ject it into the exceite function
# pass in host, port and region so your tests can override these
def create_es_client(host, port, region):
return Elasticsearch(
hosts=[{"host": host, "port": port}],
http_auth=BotoAWSRequestsAuth(
aws_host=host, aws_region=region, aws_service="es"
),
use_ssl=True,
verify_certs=True,
@sirkuttin
sirkuttin / README-Template.md
Created December 30, 2018 21:42 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@sirkuttin
sirkuttin / GitKrakenMeldWindows10.md
Last active November 20, 2023 16:57
Gitkraken can use the Git Config Default merge and diff tool. This allows you to right click a file and "open external diff tool". I like meld the best for this. This works for git command line and should work for more than just GitKraken.

First, Download and install the newest version of Meld for Windows. https://download.gnome.org/binaries/win32/meld/

Next we need to edit your .gitconfig file. This file lives as a hidden file in your user directory. Here is a sample of mine:

[user]
	email = me@email.com
	name = Sir Kuttin
[merge]