Skip to content

Instantly share code, notes, and snippets.

View adborden's full-sized avatar

Aaron D Borden adborden

View GitHub Profile
2021-06-24T14:59:48.938-0700 [DEBUG] Adding temp file log sink: /var/folders/tz/rl5bw8g941l9bs_c4zd_n_kc0000gn/T/terraform-log235802347
2021-06-24T14:59:48.938-0700 [INFO] Terraform version: 1.0.1
2021-06-24T14:59:48.938-0700 [INFO] Go runtime version: go1.16.4
2021-06-24T14:59:48.938-0700 [INFO] CLI args: []string{"/usr/local/Cellar/tfenv/2.2.2/versions/1.0.1/terraform", "refresh"}
2021-06-24T14:59:48.939-0700 [DEBUG] Attempting to open CLI config file: /Users/aarondborden/.terraformrc
2021-06-24T14:59:48.939-0700 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2021-06-24T14:59:48.940-0700 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2021-06-24T14:59:48.940-0700 [DEBUG] ignoring non-existing provider search directory /Users/aarondborden/.terraform.d/plugins
2021-06-24T14:59:48.940-0700 [DEBUG] ignoring non-existing provider search directory /Users/aarondborden/Library/Application Support/io.terraform/plugins
2021-06-24T14:59:48.940-0700 [DEBUG] ignoring non-existi
@adborden
adborden / README.md
Last active May 20, 2020 18:47
Example Redis ElastiCache configuration for Data.gov

Redis configuration template

This is an example of the Redis ElastiCache configuration that we're interested in. We're using Terraform both as a machine and human readable format to describe the configuration in concrete terms. The goal is to clearly communicate what configuration we're after and not so much to provide Terraform code for someone to run.

main.tf is the entrypoint for Terraform but most of the details of the configuration are in the redis module of

#!/bin/bash
set -o errexit
set -o pipefail
hostname=${1}
if [[ -z "$hostname" ]]; then
echo "Usage: $0 <hostname>" >&2
exit 1
@adborden
adborden / catalog.data.gov.json
Last active December 21, 2019 01:17
OpenAPI spec for catalog.data.gov
{
"openapi": "3.0.0",
"servers": [
{
"url": "https://catalog.data.gov/api/3",
"description": "Data.gov Catalog"
},
],
"info": {
"title": "Data.gov Catalog",
@adborden
adborden / csw-query-by-title.xml
Created May 10, 2019 23:23
CSW query by title
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" xmlns:ogc="http://www.opengis.net/ogc" service="CSW" version="2.0.2" resultType="results" startPosition="1" maxRecords="10" outputFormat="application/xml" outputSchema="http://www.isotc211.org/2005/gmd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd">
<csw:Query typeNames="csw:Record">
<csw:ElementSetName>brief</csw:ElementSetName>
<csw:Constraint version="1.1.0">
<ogc:Filter>
<ogc:PropertyIsLike escapeChar="\" singleChar="?" wildCard="*">
<ogc:PropertyName>dc:title</ogc:PropertyName>
<ogc:Literal>*Series Information for the Primary and Secondary Roads State-based Shapefile*</ogc:Literal>
</ogc:PropertyIsLike>
</ogc:Filter>
@adborden
adborden / csw-query-by-id.xml
Created May 10, 2019 23:21
CSW query by Id
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" xmlns:ogc="http://www.opengis.net/ogc" service="CSW" version="2.0.2" resultType="results" startPosition="1" maxRecords="10" outputFormat="application/xml" outputSchema="http://www.isotc211.org/2005/gmd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd">
<csw:Query typeNames="csw:Record">
<csw:ElementSetName>full</csw:ElementSetName>
<csw:Constraint version="1.1.0">
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>dc:identifier</ogc:PropertyName>
<ogc:Literal>SeriesCollection_tl_2015_prisecroads.shp.iso.xml</ogc:Literal> <!-- identifier here -->
</ogc:PropertyIsEqualTo>
</ogc:Filter>
#!/bin/bash
set -o errexit
set -o pipefail
set -o nounset
function check () {
local domain="$1"
@adborden
adborden / provision.sh
Last active April 16, 2019 22:42
Provisions Ubuntu 18.04 server to automatically build the disclosure database
#!/bin/bash
set -o errexit
set -o pipefail
set -o nounset
set -x
# Initialize EBS volume if it is uninitialized
if [ grep -q '^/dev/xvdb: data$' ]; then
@adborden
adborden / bulk-remove.sh
Last active March 25, 2019 17:23
Script to remove packages from CKAN API
#!/bin/bash
# bulk-remove.sh < ids-to-delete.txt > package-backup.txt
set -o errexit
set -o pipefail
set -o nounset
function fetch_and_remove () {
local identifier="$1"
@adborden
adborden / markdown-for-performance-gov.md
Last active February 21, 2018 19:34
Tips for using Jekyll and Federalist
title date
Markdown for performance.gov
2018-02-21 09:27:49 PST

Markdown for performance.gov

[Jekyll][jekyll] is a static site generator. It takes Markdown files, templates, and data files and generates HTML.

Federalist supports Jekyll out of the box. They have several