Skip to content

Instantly share code, notes, and snippets.

Corey Oordt coordt

View GitHub Profile
View samldata.json
[
{
"model": "saml2auth.identityprovider",
"pk": 1,
"fields": {
"name": "Peerfit",
"slug": "peerfit",
"metadata_url": "",
"permission_attrs": "{\"is_active\":true,\"is_staff\":true,\"is_superuser\":false}",
"sp_config": "{\"name_id_format\":\"urn:oasis:names:tc:SAML:2.0:nameid-format:persistent\",\"authn_requests_signed\":true,\"want_response_signed\":true,\"force_authn\":true,\"allow_unsolicited\":true,\"want_assertions_signed\":true,\"logout_requests_signed\":true,\"required_attributes\":[],\"optional_attributes\":[]}",
View keybase.md

Keybase proof

I hereby claim:

  • I am coordt on github.
  • I am coordt (https://keybase.io/coordt) on keybase.
  • I have a public key ASA1YiSz2seDjs64Egsf0WEct1C1e7IsnYiKVfgjUf8pMgo

To claim this, I am signing this object:

View testinfrastructure_amzn2.yaml
AWSTemplateFormatVersion: 2010-09-09
Description: Test Server Infrastructure
Parameters:
ParentVPCStack:
Description: 'Stack name of parent VPC stack based on vpc/vpc-*azs.yaml template.'
Type: String
Default: 'TestVPC'
ParentSSHBastionStack:
Description: 'Optional but recommended stack name of parent SSH bastion host/instance stack based on vpc/vpc-ssh-bastion.yaml template.'
Type: String
View test_stack.yml
---
AWSTemplateFormatVersion: 2010-09-09
Description: Test Server Infrastructure
Parameters:
ParentVPCStack:
Description: Stack name of parent VPC stack based on vpc/vpc-*azs.yaml template.
Type: String
Default: 'TestVPC'
ParentSSHBastionStack:
Description: 'Optional but recommended stack name of parent SSH bastion host/instance stack based on vpc/vpc-ssh-bastion.yaml template.'
View example_fabfile.py
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
from fabric.api import cd, run, sudo, prefix, task, env, quiet, warn_only
from fabric.contrib.files import exists, sed
from fabric.tasks import Task
# The information to connecting to the server: `testserver` is contained
# in the local user's `~/.ssh/config` file
@coordt
coordt / testinstances.py
Last active Dec 24, 2015
This is a set of Fabric tasks to create and manage dynamic test instances on a server.
View testinstances.py
"""
Tasks for managing a test server
"""
import os
from fabric.api import cd, env, prefix, run, sudo, task
from fabric.contrib.files import exists, sed
from fabric.context_managers import hide
from fabric.colors import green, red
@coordt
coordt / bootstrap.py
Created May 10, 2012
Basic virtualenv bootstrap.py script
View bootstrap.py
#!/usr/bin/env python
## WARNING: This file is generated
#!/usr/bin/env python
"""Create a "virtual" Python installation
"""
# If you change the version here, change it in setup.py
# and docs/conf.py as well.
virtualenv_version = "1.6.3"
@coordt
coordt / apache2-template.conf
Created May 10, 2012
Apache template for an application test
View apache2-template.conf
<VirtualHost *:80>
ServerAdmin test@test.com
ServerName $$$$PROJECT_NAME$$$$
ServerAlias media-$$$$PROJECT_NAME$$$$
ServerAlias $$$$PROJECT_NAME$$$$.test.education.nationalgeographic.com
DocumentRoot $$$$PROJECT_HOME$$$$$$$$PROJECT_NAME$$$$/media
WSGIDaemonProcess $$$$PROJECT_NAME$$$$ user=webdev group=webdev \
processes=3 threads=1 maximum-requests=1000 \
python-path=$$$$PROJECT_HOME$$$$$$$$PROJECT_NAME$$$$/example/virtualenv/lib/python2.6/site-packages
@coordt
coordt / wsgi.py
Created May 10, 2012
A WSGI file for an application with an example project for testing on a server
View wsgi.py
"""
Default template for WSGI definition. Assumes virtualenv is in the same
directory as this file, and is called virtualenv
"""
import os, sys, site
PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__)))
site.addsitedir('virtualenv/lib/python2.6/site-packages')
@coordt
coordt / fields.py
Created Mar 5, 2012
Django MultiSelectField
View fields.py
"""
A model field and widget that allows selecting multiple items from a static
list of choices. Based on http://djangosnippets.org/snippets/1200/
"""
from django.db import models
from django.core import exceptions
from django import forms
from django.utils.text import capfirst
class MultiSelectFormField(forms.MultipleChoiceField):
You can’t perform that action at this time.