Skip to content

Instantly share code, notes, and snippets.

View jonprindiville's full-sized avatar
🛄

Jon Prindiville jonprindiville

🛄
View GitHub Profile
@jonprindiville
jonprindiville / ecs_startup_deltas.sh
Last active November 28, 2023 17:34
Tell me about ECS startup timing...
set -euo pipefail
CLUSTER="${1}"
TASKS="${2}"
aws ecs describe-tasks --cluster "${CLUSTER}" --tasks "${TASKS}" \
| jq '.tasks[]
| {
meta: {
clusterArn: .clusterArn,
@jonprindiville
jonprindiville / cluster_client.py
Last active April 12, 2023 15:01
django-redis cluster client
"""
A sketch of a django-redis integration with the Redis cluster features recently added to
https://github.com/redis/redis-py from https://github.com/Grokzen/redis-py-cluster
For non-clustered Redis, django-redis's ConnectionFactory does some management of
connection pools shared between client instances.
The cluster client in redis-py doesn't accept a connection pool from outside, they're
managed internally. To support that, we won't be caching connection pools and passing
them into clients, we will instead be caching client instances.
@jonprindiville
jonprindiville / README.md
Last active May 17, 2019 21:17
GitHub -> known_hosts

Some commands for use in Circle CI config related to the task of getting GitHub's SSH keys into your known_hosts file.

Why is that useful? It's useful to me because I have some Circle CI jobs where I create a new branch, push it back to GitHub and create a PR. Without having a github.com entry in your known_hosts file, the git push would fail. I mean, really it would hang waiting for user input with a prompt like: