This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
OWNER=clarkritchie | |
REPO=${1:-database} | |
WORKFLOW_ID=${2} | |
if [ -z "$WORKFLOW_ID" ]; then | |
echo "Must specify a workflow name" | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
OWNER=clarkritchie | |
REPO=${1:-my-stuff} | |
WORKFLOW_NAME=${2} # this is the filename, e.g. my-foo-gha.yaml | |
if [ -z "$WORKFLOW_ID" ]; then | |
echo "Must specify a workflow name" | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Set GitHub Secrets | |
on: | |
workflow_dispatch: | |
inputs: | |
repo: | |
description: "Select the Git repository" | |
type: choice | |
required: true | |
options: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint Code | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
lint-code: | |
name: Lint code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# | |
# Quick and dirty script to purge contents from a versioned S3 bucket | |
# | |
import boto3, sys | |
BUCKET = 'some-bucket' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# this script gets your the cloudflare record id for a given hostname, type and zoneid | |
# | |
# https://www.puppeteers.net/blog/importing-dns-records-from-cloudflare-to-terraform/ | |
# | |
# Get your API key then: | |
# export AUTHKEY="xxx" | |
if [ $# -ne 4 ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# quick and dirty script to | |
# - list buckets matching | |
# - copy buckets matching | |
# - remove buckets matching | |
SEARCH=${1} | |
ACTION=${2:-"ls"} | |
if [ -z ${SEARCH} ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
import subprocess | |
from datetime import datetime, timezone | |
try: | |
date = sys.argv[1] | |
yyyy,mm,dd = date.split("-") | |
except Exception: | |
print(f"Missing data argument, usage {__file__} YYYY-MM-DD") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# This is a simple script to create/delete a Git tag in the form vA.B.C-sha | |
# | |
# Usage: | |
# | |
# ./build.sh 0.0.7 | |
# ./build.sh v0.0.7-54477d3 delete -- will delete this tag | |
# | |
# The "v" is automatically prepended and the current sha is appended when the tag is created. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# | |
# quick and dirty -- for each row in CSV 1, see if that field exists in CSV 2 | |
# | |
skip_headers=1 | |
while IFS="," read -r c1 c2 c2 c4 c5 c6 c7 # 'email' is field c2 | |
do | |
if ((skip_headers)) | |
then | |
echo "skipping header row" |
NewerOlder