Skip to content

Instantly share code, notes, and snippets.

View abridgett's full-sized avatar

Adrian Bridgett abridgett

View GitHub Profile
@abridgett
abridgett / keybase.md
Created March 15, 2017 18:46
keybase.md

Keybase proof

I hereby claim:

  • I am abridgett on github.
  • I am wyvern (https://keybase.io/wyvern) on keybase.
  • I have a public key ASBf9eg8zrvr2srUe7yyHZ-hF1WInMVYB5In7HoReRKeqgo

To claim this, I am signing this object:

@abridgett
abridgett / s3_bucket_sizes
Last active December 10, 2018 04:56
s3_bucket_sizes
#!/bin/sh
# Report S3 bucket sizes
get_bucket_size() {
bucket="$1"
today=$(date +"%Y-%m-%d")
if [ $(uname -s) = "Darwin" ]; then
yesterday=$(date -v-1d +"%Y-%m-%d")
else
@abridgett
abridgett / airflow_eg.py
Last active April 29, 2021 22:03
airflow XCOM notification example
MAP_SLACK_ATTACHMENTS = [
{
"fallback": "{{params.map}} {{ task_instance.xcom_pull(task_ids=params.map, key='slack_status') }}",
"pretext": "{{params.map}} update {{ task_instance.xcom_pull(task_ids=params.map, key='slack_status') }}",
"fields": [
{
"title": "Copied",
"value": "{{ task_instance.xcom_pull(task_ids=params.map, key='copied') }}",
"short": True
}