Skip to content

Instantly share code, notes, and snippets.


Seth Ryder sethryder

View GitHub Profile
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 + ','
TomRichter / OnWipe.xml
Last active Jul 16, 2021
Installation Instructions for FFXIV ACT + Key Plugins
View OnWipe.xml
<?xml version="1.0"?>
<TriggernometryExport Version="1">
<ExportedTrigger Enabled="true" Name="On Wipe" Id="d2f2668d-dfd5-456d-a404-1d2b5cdd18cd" RegularExpression="(wipeout|0038:end|21:([0-9,a-f,A-F]{8}):40000010)" DebugLevel="Inherit" PrevActions="Keep" PrevActionsRefire="Allow" Scheduling="FromFire" PeriodRefire="Allow" RefirePeriodExpression="0">
<Action DiscordTts="false" OrderNumber="1" AuraImageMode="Normal" TextAuraAlignment="MiddleCenter" TextAuraFontSize="8.25" TextAuraEffect="None" TextAuraUseOutline="false" Enabled="true" ActionType="EndEncounter" ExecutionDelayExpression="0" Asynchronous="true" DebugLevel="Inherit" RefireInterrupt="false" RefireRequeue="true" SystemBeepFreqExpression="1000" SystemBeepLengthExpression="100" PlaySoundVolumeExpression="100" PlaySoundExclusive="true" PlaySoundMyself="false" PlaySpeechMyself="false" UseTTSVolumeExpression="100" UseTTSRateExpression="0" UseTTSExclusive="true" LaunchProcessWindowStyle="Normal" ExecScriptType="CSharp" MessageBoxIcon
zahna / gist:b302ee6d150405e5430855e53d5771ee
Last active Aug 8, 2017
render any number of recaptchas that are on a single page
View gist:b302ee6d150405e5430855e53d5771ee
In the page somewhere:
<script type="text/javascript" defer>
var gcRender = function() {
var sitekey, gcs, i, rcks, len;
sitekey = '';
// Render all .g-recaptcha's on the page
gcs = document.getElementsByClassName('g-recaptcha');
len = gcs.length;
for (i = 0; i < len; i++) {
yefim / Dockerfile
Last active Jul 22, 2021
Build a Docker image, push it to AWS EC2 Container Registry, then deploy it to AWS Elastic Beanstalk
View Dockerfile
# Example Dockerfile
FROM hello-world
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'
gene1wood /
Last active Jul 13, 2021
AWS Lambda function to list all available Python modules for Python 2.7 3.6 and 3.7

This gist contains lists of modules available in

in AWS Lambda.

It also contains the code to run in Lambda to generate these lists. In addition there is a less_versbose module in the code that you can call to get a list of the top level modules installed and the version of those modules (if they contain a version

danackerson / 100_base.conf
Last active May 20, 2021
using nginx + lua + redis for redirects and rewrites
View 100_base.conf
# using such a setup requires `apt-get install lua-nginx-redis` under Ubuntu Trusty
# more info @
http {
lua_package_path "/etc/nginx/include.d/?.lua;;";
lua_socket_pool_size 100;
lua_socket_connect_timeout 10ms;
lua_socket_read_timeout 10ms;
server {
bradmontgomery / install-comodo-ssl-cert-for-nginx.rst
Last active Apr 4, 2021
Steps to install a Comodo PositiveSSL certificate with Nginx.
View install-comodo-ssl-cert-for-nginx.rst

Setting up a SSL Cert from Comodo

I use as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert