Skip to content

Instantly share code, notes, and snippets.

Seth Ryder sethryder

Block or report user

Report or block sethryder

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
sethryder /
Created May 15, 2019
ebs snapshot handler lambda
import boto3
import datetime
from dateutil.relativedelta import relativedelta
import logging
import sys
logger = logging.getLogger()
def get_dates_to_keep(days_to_keep, weeks_to_keep, months_to_keep):
View ebs_last_attached_policy.json
"Version": "2012-10-17",
"Statement": [
"Effect": "Allow",
"Action": [
View gist:f085b7b783ee677dffe0ff8d4dce3cce
sethryder / yoast_redirect_fixer.php
Last active Oct 31, 2018
update redirects in yoast when changing from date based permalinks to just post name
View yoast_redirect_fixer.php
$option_value_export_plain = file_get_contents('export_plain.txt');
$option_value_base = file_get_contents('base.txt');
$export_plain = unserialize($option_value_export_plain);
$base = unserialize($option_value_base);
$new_export_plain = [];
sethryder /
Last active Jul 30, 2018
simple lambda for storing cloudfront ips in parameter store for use in other places (such as nginx for where to trust X-Forwarded-For headers)
from botocore.vendored import requests
import json
import boto3
def get_cloudfront_ips():
ip_list = ''
d = requests.get('').text
l = json.loads(d)
for ip_range in [x['ip_prefix'] for x in l['prefixes'] if x['service']=='CLOUDFRONT' ]:
ip_list += ip_range + ','
sethryder / blackbox.yml
Last active Oct 29, 2019
monitor multiple blackbox modules with a single job
View blackbox.yml
prober: http
timeout: 5s
method: GET
no_follow_redirects: false
fail_if_ssl: false
fail_if_not_ssl: true
preferred_ip_protocol: "ipv4"
View gist:5e40c4e9e406927afc494be7d9473884
### Keybase proof
I hereby claim:
* I am sethryder on github.
* I am sethryder ( on keybase.
* I have a public key whose fingerprint is F4E2 F6DC 5EB7 01DF B577 7628 B4F6 78C6 49B5 866D
To claim this, I am signing this object:
import requests
import time
import json
checks = {}
api_key = ''
api_endpoint = ''
checks['google'] = {'metric_id': 1, 'url': ''}
sethryder / aws-generate-ssh-config.php
Created Apr 12, 2016
a quickly hacked together script to generate a .ssh/config from aws instances
View aws-generate-ssh-config.php
$ssh_instances = [];
$ssh_user = 'root';
require 'vendor/autoload.php';
$ec2 = new Aws\Ec2\Ec2Client([
'version' => 'latest',
'region' => 'us-east-1'
View epel.repo.j2
name=Extra Packages for Enterprise Linux 6 - $basearch
You can’t perform that action at this time.