Skip to content

Instantly share code, notes, and snippets.

View scottnixonjr's full-sized avatar

Scott Nixon scottnixonjr

View GitHub Profile
@mneil
mneil / conftest.py
Created November 24, 2020 21:28
Patch boto3 to avoid credentials errors and real API calls during unit tests.
'''
Unit test setup automatically called
'''
from unittest import mock
import pytest
# Fixture, autouse
@pytest.fixture(scope='session', autouse=True)
def patch_boto3(request):
@shortjared
shortjared / list.txt
Last active July 19, 2024 21:20
List of AWS Service Principals
a4b.amazonaws.com
access-analyzer.amazonaws.com
account.amazonaws.com
acm-pca.amazonaws.com
acm.amazonaws.com
airflow-env.amazonaws.com
airflow.amazonaws.com
alexa-appkit.amazon.com
alexa-connectedhome.amazon.com
amazonmq.amazonaws.com
@ateucher
ateucher / setup-gh-cli-auth-2fa.md
Last active May 3, 2024 11:06
Setup git on the CLI to use 2FA with GitHub

These are instructions for setting up git to authenticate with GitHub when you have 2-factor authentication set up. This authentication should be inherited by any GUI client you are using. These are intentionally brief instructions, with links to more detail in the appropriate places.

  1. Download and install the git command-line client (if required).

  2. Open the git bash window and introduce yourself to git (if required):

    git config --global user.name 'Firstname Lastname'
    git config --global user.email 'firstname.lastname@gov.bc.ca'
    
#!/usr/bin/env bash
usage="Usage: $(basename "$0") region stack-name [aws-cli-opts]
where:
region - the AWS region
stack-name - the stack name
aws-cli-opts - extra options passed directly to create-stack/update-stack
"
@akhikhl
akhikhl / jdom2_transform.groovy
Last active July 17, 2021 08:16
XML transformation with Groovy, JDOM2 and XPath
/*
* Copyright 2013 (c) Andrey Hihlovskiy
* License: MIT (http://opensource.org/licenses/MIT)
*/
@Grab('org.jdom:jdom2:2.0.5')
@Grab('jaxen:jaxen:1.1.4')
@GrabExclude('jdom:jdom')
import org.jdom2.*