Skip to content

Instantly share code, notes, and snippets.

View speshak's full-sized avatar

Scott Peshak speshak

View GitHub Profile
@shortjared
shortjared / list.txt
Last active November 15, 2024 11:42
List of AWS Service Principals
a4b.amazonaws.com
access-analyzer.amazonaws.com
account.amazonaws.com
acm-pca.amazonaws.com
acm.amazonaws.com
airflow-env.amazonaws.com
airflow.amazonaws.com
alexa-appkit.amazon.com
alexa-connectedhome.amazon.com
amazonmq.amazonaws.com
@jedsundwall
jedsundwall / gist:7b5ea0a33cc3ca0b9764f7090a59858a
Last active October 29, 2019 14:14
Setting up a Public AWS SNS Topic

How to create a publicly-accessible SNS topic that sends messages when objects are added to a public Amazon S3 bucket.

1. Create something within AWS that triggers notifications.

In this case, that's an S3 bucket that is continually updated by the addition of new sensor data. For the purposes of this tutorial, we’ll use s3://noaa-nexrad-level2 – one of our NEXRAD on AWS buckets – as an example.

2. Create an SNS topic and appropriate policy.

The SNS topic should be in the same region as the bucket. It will need to have a policy that allows our S3 bucket to publish to it, and anyone to subscribe to it using Lambda or SQS.

#!/usr/bin/python
''' Not my script, found on the Internet, and rediscovered on my hard drive
'''
import sys
def cidr_to_regex(cidr):
ip, prefix = cidr.split('/')
base = 0
for val in map(int, ip.split('.')):
@5263
5263 / checkoutandload.FCMacro
Last active October 26, 2020 19:28
FreeCAD files git repo
#!/usr/bin/env python
import zip2git
from PySide import QtGui
# 1. Choose repository (directiory)
repodir = QtGui.QFileDialog.getExistingDirectory(QtGui.qApp.activeWindow())
if repodir:
# ToDO: 2. List branches in a list and let the user choose one
# ToDo: 3. List commits in a list and let the user choose one
# ToDo: 4. Check if it would overwrite a file. And if the file is
# part of the repo. Ask the user for cofirmation