Skip to content

Instantly share code, notes, and snippets.

View PatMyron's full-sized avatar
☁️
cfn-lint / tflint maintainer emeritus

Pat Myron PatMyron

☁️
cfn-lint / tflint maintainer emeritus
  • https://www.linkedin.com/in/patrickmyron/
  • USA
View GitHub Profile
@iann0036
iann0036 / gist:b473bbb3097c5f4c656ed3d07b4d2222
Last active April 28, 2024 11:47
List of expensive / long-term effect AWS IAM actions
route53domains:RegisterDomain
route53domains:RenewDomain
route53domains:TransferDomain
ec2:ModifyReservedInstances
ec2:PurchaseHostReservation
ec2:PurchaseReservedInstancesOffering
ec2:PurchaseScheduledInstances
rds:PurchaseReservedDBInstancesOffering
dynamodb:PurchaseReservedCapacityOfferings
s3:PutObjectRetention
@z0ph
z0ph / findings.txt
Last active December 17, 2021 00:17
AWS Access Analyzer - Policy Validation of 837 AWS Managed Policies.
==> Validation of: ./policies/TagGovernancePolicy
==> Finding: [
{
"findingDetails": "Using ForAllValues qualifier with the single-valued condition key organizations:ServicePrincipal can be overly permissive. We recommend that you remove ForAllValues:.",
"findingType": "SECURITY_WARNING",
"issueCode": "FORALLVALUES_WITH_SINGLE_VALUED_KEY",
"learnMoreLink": "https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-reference-policy-checks.html#access-analyzer-reference-policy-checks-security-warning-forallvalues-with-single-valued-key",
"locations": [
{
"path": [
@tekin
tekin / .gitattributes
Last active February 23, 2024 16:46
An example .gitattributes file that will configure custom hunk header patterns for some common languages and file formats. See https://tekin.co.uk/2020/10/better-git-diff-output-for-ruby-python-elixir-and-more for more details.
# Stick this in your home directory and point your Global Git config at it by running:
#
# $ git config --global core.attributesfile ~/.gitattributes
#
# See https://tekin.co.uk/2020/10/better-git-diff-output-for-ruby-python-elixir-and-more for more details
*.c diff=cpp
*.h diff=cpp
*.c++ diff=cpp
*.h++ diff=cpp
@IanColdwater
IanColdwater / twittermute.txt
Last active April 22, 2024 17:26
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@0xdabbad00
0xdabbad00 / grab.sh
Created May 16, 2019 02:54
Script to get all versions of all AWS managed policies
#!/bin/bash
# Use the AWS CLI to collect all versions of all AWS managed policies. Example files:
# APIGatewayServiceRolePolicy.v1
# APIGatewayServiceRolePolicy.v2
# APIGatewayServiceRolePolicy.v3
# Usage: ./grab.sh
# Note that the following policies do not exist and create zero byte files:
@0xdabbad00
0xdabbad00 / gist:d05b752c84712781c7ec7c040585bf3a
Last active January 16, 2021 23:14
AWS services per region using botocore endpoints
cat botocore/data/endpoints.json | jq -cr '.partitions[0].services | keys[] as $k | .[$k] | .endpoints|to_entries[]| .key +"\t"+ $k' | sort | cut -f1 | uniq -c | sort -nr | sed 's/^ *\([0-9][0-9]*\) /\1 /' | grep -v fips
126 us-east-1
116 us-west-2
115 eu-west-1
101 ap-southeast-2
100 ap-northeast-1
97 eu-central-1
95 us-east-2
a4b
account
acm
acm-pca
amplify
apigateway
application-autoscaling
appstream
appsync
artifact
@0xdabbad00
0xdabbad00 / CloudFormation_resources.txt
Last active May 28, 2019 15:46
CloudFormation resources. Found via: git clone --depth=1 https://github.com/awsdocs/aws-cloudformation-user-guide.git; cd aws-cloudformation-user-guide; grep -h "# AWS::" doc_source/aws-* | sed 's/# //' | sed 's/<.*//' | sort | uniq
AWS::AmazonMQ::Broker
AWS::AmazonMQ::Configuration
AWS::ApiGateway::Account
AWS::ApiGateway::ApiKey
AWS::ApiGateway::Authorizer
AWS::ApiGateway::BasePathMapping
AWS::ApiGateway::ClientCertificate
AWS::ApiGateway::Deployment
AWS::ApiGateway::DocumentationPart
AWS::ApiGateway::DocumentationVersion
@jonjack
jonjack / add-update-refresh-github-access-token-on-mac.md
Last active May 10, 2024 18:47
Adding & Updating GitHub Access Token on Mac

Using an Access Token for the first time

Follow the instructions on Github to Create an Access Token in Github

Configure Git to use the osxkeychain

By default, git credentials are not cached so you need to tell Git if you want to avoid having to provide them each time Github requires you to authenticate. On Mac, Git comes with an “osxkeychain” mode, which caches credentials in the secure keychain that’s attached to your system account.

You can tell Git you want to store credentials in the osxkeychain by running the following:-