Skip to content

Instantly share code, notes, and snippets.

View chrsmith's full-sized avatar
🍹
Friday isn't a day, it's a state of mind.

Chris Smith chrsmith

🍹
Friday isn't a day, it's a state of mind.
View GitHub Profile
@chrsmith
chrsmith / circleci-envvar-manager.sh
Created April 17, 2019 15:17
Bash script for managing CircleCI environment variables.
#!/bin/bash
#
# circleci-envvar-manager.sh
# Bash script for managing CircleCI project environment variables.
#
# This script uses the CircleCI APIs to list, create, and delete the environment
# variables associated with CircleCI projects. Suitable for scripting the
# rotation of access keys.
#
# CircleCI API documentation:
@chrsmith
chrsmith / middleware_test.go
Created February 5, 2019 07:11
WIP - IDP-initiated login tests
// TestIdentityProviderInitiated covers the cases where the SAML login is initiated by the identity provider.
//
// IDP-initiated requests are seen as an unexpected POST request to the AcsURL. It is tricky
// because there may be no "id" found in the claims in the SAML assertions, and the relay state
// may not match what is stored in the middleware's client state.
func (test *MiddlewareTest) TestIdentityProviderInitiated(c *C) {
// This test modifies the AllowIDPInitiated flag for some scenarios. Confirm this is the
// expected default state, and keep it that way after the test completes.
c.Assert(test.Middleware.AllowIDPInitiated, Equals, false)
defer func() {
@chrsmith
chrsmith / map-gen-settings.json
Created May 11, 2017 16:25
Factorio v0.15 Death World game settings
{
"_comment": "Sizes can be specified as none, very-low, low, normal, high, very-high",
"terrain_segmentation": "normal",
"water": "normal",
"width": 0,
"height": 0,
"starting_area": "normal",
"peaceful_mode": false,
"autoplace_controls":