Skip to content

Instantly share code, notes, and snippets.

View AlexAtkinson's full-sized avatar

Alex Atkinson AlexAtkinson

  • Toronto
View GitHub Profile
@AlexAtkinson
AlexAtkinson / build_mongodb.sh
Last active November 30, 2023 16:14
BASH from the PAST: Create a MondoDB Instance with Striped LVMs to cheat EBS performance...
#!/bin/bash
# ----------------------------------------------------------------------
# /root/build_mongod.sh
#
# NOTES:
# - This script has BIG AWESOME HEADERS to liven up the CLI experience...
# - DO NOT disable SELINUX... Learn it.
#
# INSTRUCTIONS:
# Launch in a screen. Pre-warming the devices takes 10-12 hours.
@AlexAtkinson
AlexAtkinson / launch-fargate.sh
Last active November 29, 2023 19:54
BASH from the PAST: Provision AWS Fargate cluster
#!/usr/bin/env bash
# --------------------------------------------------------------------------------------------------
# ./launch-stack.sh
#
# Description:
# Launches a ECS Fargate stack with blue/green deployment support.
#
# Notes:
# - This script offered as a curiosity, now, since this is now satisfied
# with Terraform.
@AlexAtkinson
AlexAtkinson / README.md
Last active January 3, 2024 19:06
Hoppscotch.ai docker-compose (that works)

Introduction

Hoppscotch is a utility like postman or insomnia that can be run locally. This quick guide will get you up and running in just a few minutes in scenarios where you want to self-host the app locally. This is bassed on hoppscotch's example docker-compose.yml.

⚠️ Despite Hoppscotch's docs stating that all data is saved with postgres, the collections data (your calls) are stored in the browser application data. When this data is cleared your collections will vanish.

Setup:

  1. Clone the repo:
@AlexAtkinson
AlexAtkinson / Assets.Dockerfile
Last active November 30, 2023 13:46
Docker Example: Building Artifacts
# DOCKER EXAMPLE: Generate assets with a docker build
# 1. Create this Dockerfile
# 2. Run: `docker build --output=foo --target=assets .`
#
# This results in an asset being created and exported to the
# local path foo/ on the host os. The key here is using
# 'scratch' to ensure an empty contianer the assets can be
# copied into before being exported. (Otherwise you get the
# entire OS.)
#
@AlexAtkinson
AlexAtkinson / GoodFastCheap.md
Created October 4, 2023 18:46
Venn Diagram - Good Fast Cheap

Good Fast Cheap

@AlexAtkinson
AlexAtkinson / docker-ignore-test.sh
Last active October 4, 2023 17:03
Docker Build - .dockerignore Interactions
#!/usr/bin/env bash
dir=$(mktemp -d)
cd $dir > /dev/null
export DOCKER_BUILDKIT=1
echo -e "FROM node:20-alpine\nCOPY . tmp/" > Dockerfile_foo
cp Dockerfile_foo Dockerfile_bar
touch foo bar
@AlexAtkinson
AlexAtkinson / GithubActions.md
Last active May 8, 2024 21:54
GitHub Actions Cheat Sheet

Github Actions Cheat Sheet

Useful References

Dynamically linking Github objects is immensely useful. This table contains some good examples:

Linking Github Objects
@AlexAtkinson
AlexAtkinson / Versioning.md
Last active November 30, 2023 14:51
A quick DevOps primer on product versioning for the SDLC.

Versioning

RELATED: Artifacting.md

Versioning is an ancient problem, but this GIST mostly focuses on the computing era and versioning for software. This primer details a few versioning tactics along with some advisories and warnings.

Who is this for? Historically this would have been the bread and butter of the Release Manager, but these majestic creatures are long extinct. These days DevOps is responsbile for automating the SDLC, but this material can only serve to enrich anyone interested in or involved in the software industry.

AdHoc

Keybase proof

I hereby claim:

  • I am alexatkinson on github.
  • I am evilkittenlord (https://keybase.io/evilkittenlord) on keybase.
  • I have a public key ASDWPiUXZ43yuzpkbnsKjleOCclpnUhoVwYQmLcKWaKGsAo

To claim this, I am signing this object:

@AlexAtkinson
AlexAtkinson / GOACCESS-AWS-ELB.md
Last active April 12, 2024 16:02
Analyzer AWS ELB logs (s3) with goaccess

GoAccess ELB Logs

Setup

Assuming you have an AWS account and a Load Balancer that's logging to S3, the only other things you'll need are:

  • s3 cli
  • goaccess
    • NOTE: Scroll down. You don't have to build from source.
  • goaccessrc file to map the log format. Create the file ~/.goaccessrc