brew install pcre2
find . -type f | xargs pcregrep -M 'pattern'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'datadog/statsd' | |
require 'json' | |
statsd = Datadog::Statsd.new('localhost', 8125) | |
queue_fields = %w( | |
consumer_utilisation | |
consumers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# typed: true | |
# @prettier | |
require 'sorbet-runtime' | |
# Put this somewhere like lib/rubocop/cop/lint/sorbet_sigil.rb and then | |
# require it in .rubocop.yml: | |
# | |
# require: | |
# - ./lib/rubocop/cop/lint/sorbet_sigil.rb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Reference implementation of a load balanced PgBouncer service on Amazon ECS | |
# | |
# see: https://engineering.loyaltylion.com/load-balanced-pgbouncer-service-on-amazon-ecs-f02120d1733e | |
# | |
resource "aws_lb" "pgbouncer" { | |
name = "${var.environment}-pgbouncer" | |
internal = true | |
load_balancer_type = "network" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { resolve } from 'path' | |
import { GatsbyCreatePages } from './types' | |
const createPages: GatsbyCreatePages = async ({ | |
graphql, | |
boundActionCreators, | |
}) => { | |
const { createPage } = boundActionCreators | |
const allMarkdown = await graphql(` |
clarkdave.net/files/osx-british.zip
Place in /Library/Keyboard Layouts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
# (https://github.com/chef-cookbooks/chef-server) | |
# - 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) | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
## | |
# Use this annotated script a base for launching an interactive console task on Amazon ECS | |
# | |
# more info: https://engineering.loyaltylion.com/running-an-interactive-console-on-amazon-ecs-c692f321b14d | |
# | |
# Requirements: | |
# - `jq` must be installed on both the client and server | |
## |
I hereby claim:
- I am clarkdave on github.
- I am clarkdave (https://keybase.io/clarkdave) on keybase.
- I have a public key ASAAW7KQ7BqcEQjDD--DhGxAF_Ufz_IT71BmARZuxJotRwo
To claim this, I am signing this object:
NewerOlder