Skip to content

Instantly share code, notes, and snippets.

View sbarrick's full-sized avatar

Shawn Barrick sbarrick

View GitHub Profile
@tasoseng
tasoseng / exclude_webconf_cidrs.py
Last active March 8, 2023 14:37
exclude zoom, teams, webex cidrs from openvpn routes (split tunnel)
import requests
import re
import ipaddress
with requests.Session() as s:
r = s.get('https://support.zoom.us/hc/en-us/articles/201362683-Network-Firewall-or-Proxy-Server-Settings-for-Zoom%C2%A0%20')
zoom = list(set(re.findall(r'(?:\d{1,3}.){3}\d{1,3}\/\d{1,2}', r.text)))
#r = s.get('https://docs.microsoft.com/en-us/microsoft-365/enterprise/urls-and-ip-address-ranges?view=o365-worldwide#skype-for-business-online-and-microsoft-teams')
#teams = list(set(re.findall(r'(?:\d{1,3}.){3}\d{1,3}\/\d{1,2}', r.text)))
@quiver
quiver / iam-policy.json
Last active April 23, 2024 07:02
How to connect to Amazon RDS PostgreSQL with IAM credentials
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"rds-db:connect"
],
"Resource": [
"arn:aws:rds-db:region:account-id:dbuser:dbi-resource-id/database-user-name"