Skip to content

Instantly share code, notes, and snippets.

Dave Clark clarkdave

Block or report user

Report or block clarkdave

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
clarkdave /
Last active Oct 3, 2018
[Terraform] Load balanced PgBouncer service on Amazon ECS
# Reference implementation of a load balanced PgBouncer service on Amazon ECS
# see:
resource "aws_lb" "pgbouncer" {
name = "${var.environment}-pgbouncer"
internal = true
load_balancer_type = "network"
clarkdave / createPages.ts
Created Apr 15, 2018
TypeScript + Gatsby node API
View createPages.ts
import { resolve } from 'path'
import { GatsbyCreatePages } from './types'
const createPages: GatsbyCreatePages = async ({
}) => {
const { createPage } = boundActionCreators
const allMarkdown = await graphql(`
brew install pcre2

find . -type f | xargs pcregrep -M 'pattern'
clarkdave /
Last active Nov 14, 2017
macOS British PC keyboard layouts
clarkdave /
Created Jun 29, 2017
(AWS Lambda) Send ECS Task events to CloudWatch Logs
# This lambda function can be linked with CloudWatch events to send Task state changes to
# a CloudWatch Logs stream
# This is highly recommended as, in my experience, the API does *NOT* return all state change
# events; this is the only way to reliably see them all
import os
import time
import json
import boto3
clarkdave /
Last active Jun 29, 2017
[CHEF] Bootstrap a Chef Server 12
#!/bin/bash -ex
# Use this script template to bootstrap a Chef Server (version 12)
# - bootstraps the Chef server using chef-solo and the official chef-server cookbook
# (
# - uses Lego (acme client) to generate and renew an SSL certificate for the server
# - installs the manage (web ui), push jobs and reporting addons (free for < 25 nodes)
# - configures a few sane defaults (no sign ups from web ui)
clarkdave /
Last active May 29, 2019
#!/bin/bash -e
# Use this annotated script a base for launching an interactive console task on Amazon ECS
# more info:
# Requirements:
# - `jq` must be installed on both the client and server

Keybase proof

I hereby claim:

  • I am clarkdave on github.
  • I am clarkdave ( on keybase.
  • I have a public key ASAAW7KQ7BqcEQjDD--DhGxAF_Ufz_IT71BmARZuxJotRwo

To claim this, I am signing this object:

clarkdave / sublimetext3.json
Created Nov 10, 2015
sublime text 3 config
View sublimetext3.json
"auto_find_in_selection": true,
"base64fold_all_uris": false,
"bold_folder_labels": false,
"caret_style": "blink",
"color_scheme": "Packages/User/SublimeLinter/Blackboard (SL).tmTheme",
"enable_tab_scrolling": false,
"fade_fold_buttons": false,
"find_selected_text": true,
"font_face": "Source Code Pro Light",
clarkdave / gist:609fc3049dcf9c8aa559
Last active Aug 29, 2015
gevent ubuntu 12.04 setuptools issue
View gist:609fc3049dcf9c8aa559

Error, on Ubuntu 12.04

$ sudo -H pip install gevent
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pip/", line 232, in main
    status =, args)
  File "/usr/local/lib/python2.7/dist-packages/pip/commands/", line 339, in run
  File "/usr/local/lib/python2.7/dist-packages/pip/req/", line 229, in prepare_files
You can’t perform that action at this time.