Skip to content

Instantly share code, notes, and snippets.

Paul Oprea pauloprea

Block or report user

Report or block pauloprea

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am pauloprea on github.
  • I am paul_oprea (https://keybase.io/paul_oprea) on keybase.
  • I have a public key ASDqfzlvX3Ri1jTSkV2MZixXY0KYgq4Jo9kB9_UKJIUEUgo

To claim this, I am signing this object:

@pauloprea
pauloprea / setresourceip.py
Created Jan 21, 2017
Dynamic DNS Script for Amazon Lambda (to use with Amazon API Gateway)
View setresourceip.py
import re
import boto3
def is_valid_host(host):
if len(host) > 255:
return False
if host[-1] == ".":
host = host[:-1]
allowed = re.compile("(?!-)[A-Z\d-]{1,63}(?<!-)$", re.IGNORECASE)
return all(allowed.match(x) for x in host.split("."))
You can’t perform that action at this time.