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
@ChrisCarini
ChrisCarini / Shodan.io Port Usage - US
Last active April 17, 2025 01:25
Shodan.io Port Usage - US
Port 443 │ █████████████████████████████ │ 21039099
Port 80 │ ████████████████████████████▋ │ 20785076
Port 7547 │ ███████████░░░░░░░░░░░░░░░░░░ │ 7990873
Port 22 │ ████████░░░░░░░░░░░░░░░░░░░░░ │ 5836299
Port 4567 │ ███████▎░░░░░░░░░░░░░░░░░░░░░ │ 5322453
Port 161 │ ███▋░░░░░░░░░░░░░░░░░░░░░░░░░ │ 2713961
Port 8080 │ ███▏░░░░░░░░░░░░░░░░░░░░░░░░░ │ 2332741
Port 8443 │ ███▏░░░░░░░░░░░░░░░░░░░░░░░░░ │ 2287681
Port 53 │ ██▌░░░░░░░░░░░░░░░░░░░░░░░░░░ │ 1884628
Port 2087 │ ██▌░░░░░░░░░░░░░░░░░░░░░░░░░░ │ 1869099
@iann0036
iann0036 / gist:b473bbb3097c5f4c656ed3d07b4d2222
Last active January 28, 2025 16:24
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 December 2, 2024 14:23
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 14, 2025 16:31
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
@0penBrain
0penBrain / commitCount.sh
Last active February 18, 2025 10:05
The simplest way to get commit count of a GitHub repository through the API
curl -I -k "https://api.github.com/repos/:owner/:repo/commits?per_page=1" | sed -n '/^[Ll]ink:/ s/.*"next".*page=\([0-9]*\).*"last".*/\1/p'
### And that's all !
# I saw many fighting with finding first commit SHA or similar fancy thing.
# Here we just rely on the GH API, asking commits at 1 per page and parsing the last page number in the header of the reply (whose body only holds the last commit !)
# So this is robust and bandwidth efficient. :)
# If one want the commit count of a specific SHA, just use :
curl -I -k "https://api.github.com/repos/:owner/:repo/commits?per_page=1&sha=:sha" | sed -n '/^[Ll]ink:/ s/.*"next".*page=\([0-9]*\).*"last".*/\1/p'
@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:
@573
573 / readme.js
Created April 30, 2019 11:04
Add this bookmarklet for archive.today
javascript:void(open('http://archive.today/?run=1&url='+encodeURIComponent(document.location)))
@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