Skip to content

Instantly share code, notes, and snippets.

View a-abella's full-sized avatar

Antonio Abella a-abella

View GitHub Profile
@a-abella
a-abella / github_git_ip4.txt
Created March 24, 2023 16:29
All GitHub git IPv4s expanded from CIDRs in api.github.com/meta
192.30.252.0
192.30.252.1
192.30.252.2
192.30.252.3
192.30.252.4
192.30.252.5
192.30.252.6
192.30.252.7
192.30.252.8
192.30.252.9
@a-abella
a-abella / strip_github.sh
Last active April 6, 2023 09:54
Remove all github (v4) from known_hosts
#!/bin/bash
##
## IP list generated from api.github.com/meta .git block , https://gist.github.com/a-abella/fb31a028943b804e8ada6cda4efbe9b6
##
KNOWN_HOSTS_FILE="${1:-"$HOME"/.ssh/known_hosts}"
for entry in github.com $( curl -s https://gist.githubusercontent.com/a-abella/fb31a028943b804e8ada6cda4efbe9b6/raw/1fde650fd0e1005a61439065fdedcafde7730bc0/github_git_ip4.txt) ; do
ssh-keygen -f "$KNOWN_HOSTS_FILE" -R "$entry"