Skip to content

Instantly share code, notes, and snippets.

View gburgett's full-sized avatar

Gordon gburgett

View GitHub Profile
@gburgett
gburgett / serverless.yml
Created November 20, 2022 18:45
Serverless config for AWS Lambda ruby fn with DynamoDB and SES
service: wcc-x
frameworkVersion: '3'
provider:
name: aws
region: us-east-1
runtime: ruby2.7
memorySize: 256
timeout: 10
@gburgett
gburgett / bundle_grep
Created August 1, 2022 18:25
Bundle Grep
#! /usr/bin/env bash
bundle list | \
awk '{ print $2 }' | \
sed '1d;$d' | \
xargs -I{} bundle show {} 2>/dev/null | \
xargs -I {} rg "$@" {}
@gburgett
gburgett / changelog_all.sh
Created January 5, 2022 16:00
changelog_all.sh
#! /bin/bash
SCRIPT=$0
COLOR_NC='\033[0m' # No Color
COLOR_LGREEN='\033[1;32m'
COLOR_GRAY='\033[1;30m'
COLOR_RED='\033[0;31m'
COLOR_CYAN='\033[0;36m'
@gburgett
gburgett / open_prs_all.sh
Created January 5, 2022 15:59
open_prs_all.sh
#! /bin/bash
SCRIPT=$0
COLOR_NC='\033[0m' # No Color
COLOR_LGREEN='\033[1;32m'
COLOR_GRAY='\033[1;30m'
COLOR_RED='\033[0;31m'
COLOR_CYAN='\033[0;36m'
@gburgett
gburgett / logentries
Last active July 9, 2021 16:05
logentries API wrapper
#! /usr/bin/env bash
COLOR_NC='\033[0m' # No Color
COLOR_LGREEN='\033[1;32m'
COLOR_GRAY='\033[1;30m'
COLOR_LGRAY='\033[0;37m'
COLOR_RED='\033[0;31m'
logv() {
[[ -z "$VERBOSE" ]] && return 0;
@gburgett
gburgett / bugsnag
Last active March 9, 2020 16:10
A utility script to download error instances from the Bugsnag API. Automatically paginates and handles rate limits.
#! /bin/bash
COLOR_NC='\033[0m' # No Color
COLOR_LGREEN='\033[1;32m'
COLOR_GRAY='\033[1;30m'
COLOR_LGRAY='\033[0;37m'
COLOR_YELLOW='\033[1;33m'
COLOR_RED='\033[0;31m'
DIR="$( cd "$( dirname "$0" )" && pwd )"
@gburgett
gburgett / contentful_export_all.sh
Last active June 10, 2020 23:05
A bash script to do a contentful export of every space you have access to, and upload it to AWS S3. Can be run as a cron job.
#! /usr/bin/env bash
# Copyright 2020 Watermark Community Church
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@gburgett
gburgett / compassion.sh
Created November 14, 2018 22:34
Compassion kids extractor
#! /bin/bash
COLOR_NC='\033[0m' # No Color
COLOR_LGREEN='\033[1;32m'
COLOR_GRAY='\033[1;30m'
COLOR_LGRAY='\033[0;37m'
COLOR_RED='\033[0;31m'
logv() {
[[ -z "$VERBOSE" ]] && return 0;
@gburgett
gburgett / secrets
Last active August 30, 2018 16:06
git secrets patterns
[a-f0-9]{128}
[a-f0-9]{64}
\=\s*[a-f0-9]{32}
\=\s*[A-Za-z0-9]{39}
CFPAT\-.+
GTM\-.+
TOKEN\=[a-zA-Z0-9]
password\=
PASSWORD\=
@gburgett
gburgett / contentful.sh
Last active February 26, 2018 15:11
Bash script in rails `bin` directory wrapping Contentful command line tools to make them similar to rails DB tools
#!/bin/bash
COLOR_NC='\033[0m' # No Color
COLOR_GRAY='\033[1;30m'
COLOR_RED='\033[0;31m'
COLOR_LCYAN='\033[1;36m'
COLOR_YELLOW='\033[1;33m'
COLOR_LGREEN='\033[1;32m'
logv() {