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 December 6, 2025 12:07
Shodan.io Port Usage - US
Port 80 │ █████████████████████████████ │ 18282379
Port 443 │ █████████████████████████▌░░░ │ 16148831
Port 7547 │ ███████████▍░░░░░░░░░░░░░░░░░ │ 7187537
Port 22 │ █████████▋░░░░░░░░░░░░░░░░░░░ │ 6099059
Port 4567 │ ████████▍░░░░░░░░░░░░░░░░░░░░ │ 5354224
Port 161 │ ████▎░░░░░░░░░░░░░░░░░░░░░░░░ │ 2721320
Port 8080 │ ███▍░░░░░░░░░░░░░░░░░░░░░░░░░ │ 2200335
Port 8443 │ ███▎░░░░░░░░░░░░░░░░░░░░░░░░░ │ 2096441
Port 53 │ ██▉░░░░░░░░░░░░░░░░░░░░░░░░░░ │ 1886846
Port 2083 │ ██▋░░░░░░░░░░░░░░░░░░░░░░░░░░ │ 1691358
@iann0036
iann0036 / gist:b473bbb3097c5f4c656ed3d07b4d2222
Last active November 14, 2025 12:59
List of expensive / long-term effect AWS IAM actions
acm-pca:CreateCertificateAuthority
aws-marketplace:AcceptAgreementApprovalRequest
aws-marketplace:Subscribe
backup:PutBackupVaultLockConfiguration
bedrock:CreateProvisionedModelThroughput
bedrock:UpdateProvisionedModelThroughput
devicefarm:PurchaseOffering
dynamodb:PurchaseReservedCapacityOfferings
ec2:ModifyReservedInstances
ec2:PurchaseCapacityBlock
import requests, json
from datetime import datetime
# Get access token
r_token = requests.get("https://open.spotify.com/get_access_token?reason=transport&productType=web_player").json()
token = r_token["accessToken"]
token_expiration = datetime.fromtimestamp(r_token["accessTokenExpirationTimestampMs"] / 1000)
# Get album playcount
def get_playcount(album_id):
@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": [
@nntrn
nntrn / espn-api-list.md
Last active December 1, 2025 13:16
List of nfl api endpoints from espn

List of NFL API Endpoints

This page has been updated a lot in the past 3 years. Older revisions you might like more than this one:

@tekin
tekin / .gitattributes
Last active July 2, 2025 17:00
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 December 6, 2025 11:37
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 November 10, 2025 16:35
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: