Skip to content

Instantly share code, notes, and snippets.

View kylehodgetts's full-sized avatar

Kyle Hodgetts kylehodgetts

View GitHub Profile

Keybase proof

I hereby claim:

  • I am kylehodgetts on github.
  • I am kyle_hodgetts (https://keybase.io/kyle_hodgetts) on keybase.
  • I have a public key ASCb76VjtBbwvegJ-suYyYEMVKkh2WM-kPPr0dMQ3rb5Fwo

To claim this, I am signing this object:

@kylehodgetts
kylehodgetts / txt
Created February 27, 2024 11:30
terraform-debug
2024-02-27T11:24:29.325Z [INFO] Terraform version: 1.7.4
2024-02-27T11:24:29.326Z [DEBUG] using github.com/hashicorp/go-tfe v1.41.0
2024-02-27T11:24:29.326Z [DEBUG] using github.com/hashicorp/hcl/v2 v2.19.1
2024-02-27T11:24:29.326Z [DEBUG] using github.com/hashicorp/terraform-svchost v0.1.1
2024-02-27T11:24:29.326Z [DEBUG] using github.com/zclconf/go-cty v1.14.1
2024-02-27T11:24:29.326Z [INFO] Go runtime version: go1.21.5
2024-02-27T11:24:29.326Z [INFO] CLI args: []string{"/Users/kyle.hodgetts/.asdf/installs/terraform/1.7.4/bin/terraform", "apply", "plan"}
2024-02-27T11:24:29.326Z [DEBUG] Attempting to open CLI config file: /Users/kyle.hodgetts/.terraformrc
2024-02-27T11:24:29.326Z [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2024-02-27T11:24:29.326Z [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
swagger: '2.0'
info:
title: httpbin.org
description: API Management facade for a very handy and free online HTTP tool.
version: '1.0'
host: httpbin.org
schemes:
- http
- https
paths:
@kylehodgetts
kylehodgetts / forced_keyword_params.py
Created August 31, 2021 15:53
Python 3: Forced keyword-only parameters
# Source: PyTricks
# In Python 3 you can use a bare "*" asterisk
# in function parameter lists to force the
# caller to use keyword arguments for certain
# parameters:
def f(a, b, *, c='x', d='y', e='z'):
return 'Hello'
# To pass the value for c, d, and e you
@kylehodgetts
kylehodgetts / role_arn_to_session.py
Created October 7, 2020 15:30 — forked from gene1wood/role_arn_to_session.py
Simple python function to assume an AWS IAM Role from a role ARN and return a boto3 session object
import boto3
def role_arn_to_session(**args):
"""
Usage :
session = role_arn_to_session(
RoleArn='arn:aws:iam::012345678901:role/example-role',
RoleSessionName='ExampleSessionName')
client = session.client('sqs')
"""
@kylehodgetts
kylehodgetts / Queue.go
Created October 9, 2017 12:57
Queue Imp in Go
package main
import "fmt"
type Collection []interface{}
type IQueue interface {
insert(e interface{})
pop() interface{}
peek() interface{}