Skip to content

Instantly share code, notes, and snippets.

View coordt's full-sized avatar

Corey Oordt coordt

View GitHub Profile
@coordt
coordt / testinstances.py
Last active December 24, 2015 22:49
This is a set of Fabric tasks to create and manage dynamic test instances on a server.
"""
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
# -*- 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
---
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.'
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

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:

[
{
"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\":[]}",

Releasing Software

What is a software release?

A release is the immutable packaging of a software product. Software releases are an essential component of modern software development and the software development life cycle for two main reasons:

  • They are intentional. Someone decided what changes are required to give value and when the changes are ready for others to use.
  • They include context. Information about the difference between the code at two points is conveyed. Whether it is simply by the version indicating the scope or including additional artifacts such as a changelog, the user has more information than "something changed."

The developer plays a key role in a software release because a thoughtful decision is required.

@coordt
coordt / auto-release.sh
Created September 18, 2022 14:50
Generate a release using generate-changelog and bump version
#!/usr/bin/env bash
# Generate the changelog, make a release if necessary and return the version number
# Pass in the path to the source repo so the appropriate __init__.py file is changed
SOURCE_DIR=$1
# The first 20 characters of the branch name for development releases
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD | cut -c 1-20)
# Generate the changelog and get the release hint
{
"title": "Values",
"description": "Basic contents of a Values file.",
"type": "object",
"properties": {
"defaultComponent": {
"title": "Defaultcomponent",
"description": "The default configurations of a component, if not overridden.",
"allOf": [
{
@coordt
coordt / autocast.py
Last active May 7, 2023 13:41
Automatically detect the true Python type of a string and cast it
"""
Automatically detect the true Python type of a string and cast it to the correct type.
Based on https://github.com/cgreer/cgAutoCast/blob/master/cgAutoCast.py
"""
import contextlib
from typing import Any