Skip to content

Instantly share code, notes, and snippets.

View jeffwecan's full-sized avatar

Jeffrey Hogan jeffwecan

View GitHub Profile
@jeffwecan
jeffwecan / schedule_to_sheets.py
Created May 29, 2024 17:58
Grabs a list of matches from MLS API and dumps it into a Google Docs spreadsheet.
#!/usr/bin/env python
import json
from datetime import date
import click
import gspread
import requests
from logzero import logger
alert("Hello! I am an alert box!!");
@jeffwecan
jeffwecan / github_jwt_auth.tf
Created April 6, 2022 14:53
Example of using GitHub OIDC ID token claims for per-repo K/V path access via templated Vault policies.
variable "github_jwt_issuer_url" {
description = "Issuer URL for GitHub; used in JWT/OIDC auth method configuration."
type = string
default = "https://token.actions.githubusercontent.com"
}
variable "github_org_name" {
type = string
default = "some-github-org"
}
@jeffwecan
jeffwecan / example_output.md
Created January 17, 2022 17:13
member_card/
%▶ ./member_card/main.py --email=jeff.hogan1@gmail.com --membership-sku=SQ3671268 -q 
[I 220117 11:10:10 main:160] Stats: len(subscriptions)=2494 / len(active_subscriptions)=2030 / len(inactive_subscriptions)=464
[I 220117 11:10:10 main:168] Subscription found for jeff.hogan1@gmail.com:
    [<AnnualSubscription jeff.hogan1@gmail.com 2022-01-07T19:56:44.782000+00:00 fulfillment_status=PENDING (active=True) ... >, <AnnualSubscription jeff.hogan1@gmail.com 2021-07-15T20:23:31.635000+00:00 fulfillment_status=FULFILLED (active=True) ... >]
<print membership card here>
variable "allowlist_excluded_ips" {
type = list(string)
default = [
"127.0.0.1/32",
"192.168.240.0/23",
]
}
variable "allowlist_source_range" {
type = list(string)
terraform -version
2020/06/17 14:23:16 [INFO] Terraform version: 0.13.0 beta2
2020/06/17 14:23:16 [INFO] Go runtime version: go1.14.2
2020/06/17 14:23:16 [INFO] CLI args: []string{"/usr/local/Cellar/tfenv/2.0.0/versions/0.13.0-beta2/terraform", "-version"}
2020/06/17 14:23:16 [DEBUG] Attempting to open CLI config file: /Users/me/.terraformrc
2020/06/17 14:23:16 Loading CLI configuration from /Users/me/.terraformrc
2020/06/17 14:23:16 Loading CLI configuration from /Users/me/.terraform.d/credentials.tfrc.json
2020/06/17 14:23:16 [DEBUG] checking for credentials in "/Users/me/.terraform.d/plugins"
2020/06/17 14:23:16 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2020/06/17 14:23:16 [DEBUG] will search for provider plugins in /Users/me/.terraform.d/plugins
@jeffwecan
jeffwecan / init_after_state_rm.log
Created June 5, 2020 16:26
running 0.13 init after state rm
$ terraform init
2020/06/05 11:24:17 [INFO] Terraform version: 0.13.0 beta1
2020/06/05 11:24:17 [INFO] Go runtime version: go1.14.2
2020/06/05 11:24:17 [INFO] CLI args: []string{"/usr/local/Cellar/tfenv/1.0.2/versions/0.13.0-beta1/terraform", "init"}
2020/06/05 11:24:17 [DEBUG] Attempting to open CLI config file: /Users/jeffwecan/.terraformrc
2020/06/05 11:24:17 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/06/05 11:24:17 Loading CLI configuration from /Users/jeffwecan/.terraform.d/credentials.tfrc.json
2020/06/05 11:24:17 [DEBUG] checking for credentials in "/Users/jeffwecan/.terraform.d/plugins"
2020/06/05 11:24:17 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2020/06/05 11:24:17 [DEBUG] ignoring non-existing provider search directory /Users/jeffwecan/Library/Application Support/io.terraform/plugins
@jeffwecan
jeffwecan / state_rm.log
Created June 5, 2020 16:25
removing terraform datasource from "state"
%▶ terraform state rm data.terraform_remote_state.infrastructure
2020/06/05 11:24:05 [INFO] Terraform version: 0.13.0 beta1
2020/06/05 11:24:05 [INFO] Go runtime version: go1.14.2
2020/06/05 11:24:05 [INFO] CLI args: []string{"/usr/local/Cellar/tfenv/1.0.2/versions/0.13.0-beta1/terraform", "state", "rm", "data.terraform_remote_state.infrastructure"}
2020/06/05 11:24:05 [DEBUG] Attempting to open CLI config file: /Users/jeffwecan/.terraformrc
2020/06/05 11:24:05 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/06/05 11:24:05 Loading CLI configuration from /Users/jeffwecan/.terraform.d/credentials.tfrc.json
2020/06/05 11:24:05 [DEBUG] checking for credentials in "/Users/jeffwecan/.terraform.d/plugins"
2020/06/05 11:24:05 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2020/06/05 11:24:05 [DEBUG] ignoring non-existing provider search directory /Users/jeffwecan/Library/Application Support/io.terraform/plugins
@jeffwecan
jeffwecan / tf_0-13_init.log
Created June 5, 2020 16:01
No compatible versions of registry.terraform.io/-/terraform provider - 0.13-beta1
2020/06/05 10:58:10 [INFO] Terraform version: 0.13.0 beta1
2020/06/05 10:58:10 [INFO] Go runtime version: go1.14.2
2020/06/05 10:58:10 [INFO] CLI args: []string{"/usr/local/Cellar/tfenv/1.0.2/versions/0.13.0-beta1/terraform", "init"}
2020/06/05 10:58:10 [DEBUG] Attempting to open CLI config file: /Users/jeffwecan/.terraformrc
2020/06/05 10:58:10 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/06/05 10:58:10 Loading CLI configuration from /Users/jeffwecan/.terraform.d/credentials.tfrc.json
2020/06/05 10:58:10 [DEBUG] checking for credentials in "/Users/jeffwecan/.terraform.d/plugins"
2020/06/05 10:58:10 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2020/06/05 10:58:10 [DEBUG] ignoring non-existing provider search directory /Users/jeffwecan/Library/Application Support/io.terraform/plugins
2020/06/05 10:58:10 [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins
BEGIN MESSAGE.
GcEHgB2dqHloaQT ibjY01ZQpPN1Qpd jvDpD0hg31Rlyav SJYx56DGRtCLhVa
HRNwxagjtM6yK2S LXGwzwAmSZ5TCKq 6Xr2MZHgg4eetgq zklrWU0Mo6IV1Xr
FcaZprzffSYi4DV u2g78kEaj7cNjFY cFVtCodX6FMPcWv yfDjWrNBx2ldijs
dIxsmGeCejqo1mp azlpldDarlhJJ0w ItULo29HFxl.
END MESSAGE.