Skip to content

Instantly share code, notes, and snippets.

View jm96441n's full-sized avatar

John Maguire jm96441n

View GitHub Profile
@jm96441n
jm96441n / knowledge-gaps.md
Created November 10, 2025 01:18
Prompts I Use

Knowledge Navigator - System Prompt

You are the Knowledge Navigator, an AI designed to help users map their understanding of knowledge domains, identify connections between concepts, and discover knowledge gaps worth exploring.

Core Capabilities:

  • Analyze users' existing knowledge to identify conceptual relationships
  • Visualize knowledge structures through clear descriptions and frameworks
  • Identify critical gaps in understanding that would enhance comprehension
  • Suggest logical learning pathways based on the user's current foundation
  • Provide contextual recommendations for related domains worth exploring
@dataclass
class Node:
val: int
key: int
next: Optional[None]
prev: Optional[None]
class LRUCache:
def __init__(self, capacity: int):
@jm96441n
jm96441n / go.mod
Created March 28, 2025 15:23
Testcontainers WithReuse and WithContainerName test
module test
go 1.23.0
require (
github.com/testcontainers/testcontainers-go v0.36.0
github.com/testcontainers/testcontainers-go/modules/postgres v0.36.0
)
require (
@jm96441n
jm96441n / chat.md
Last active October 9, 2024 19:09
Talking Paxos

Explaining the Paxos Distributed Consensus Algorithm

human (Oct 8, 2024, 10:37 AM)

can you explain the paxos distributed consensus algorithm to me?

assistant (Oct 8, 2024, 10:37 AM)

I'd be happy to explain the Paxos distributed consensus algorithm. Paxos is a protocol for solving consensus in a network of unreliable processors. Here's a concise overview:

@jm96441n
jm96441n / bender-service.yaml
Last active August 19, 2024 20:45
test terminating gateway ACLs with external services
---
apiVersion: consul.hashicorp.com/v1alpha1
kind: ServiceDefaults
metadata:
name: bender
namespace: default
spec:
protocol: http
---
apiVersion: v1
---
apiVersion: consul.hashicorp.com/v1alpha1
kind: ServiceDefaults
metadata:
name: bender
namespace: abc
spec:
protocol: http
---
apiVersion: v1
@jm96441n
jm96441n / cluster.yaml
Last active June 12, 2024 19:52
gw-cleanup
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
name: basic
nodes:
- role: control-plane
image: kindest/node:v1.25.3
- role: worker
image: kindest/node:v1.25.3
@jm96441n
jm96441n / consul_values.yaml
Last active May 16, 2024 19:13
apigw-multiple-policys
# Contains values that affect multiple components of the chart.
global:
imageK8S: hashicorp/consul-k8s-control-plane:1.3
image: hashicorp/consul-enterprise:1.18-ent
logLevel: debug
tls:
enabled: true
acls:
manageSystemACLs: true
enterpriseLicense:
@jm96441n
jm96441n / bender-service.yaml
Last active May 15, 2024 19:05
serviceRegistration
---
apiVersion: consul.hashicorp.com/v1alpha1
kind: ServiceDefaults
metadata:
name: bender
namespace: default
spec:
protocol: http
---
apiVersion: v1
@jm96441n
jm96441n / bender-service.yaml
Last active April 22, 2024 15:44
termgw-secrets-removal
---
apiVersion: consul.hashicorp.com/v1alpha1
kind: ServiceDefaults
metadata:
name: bender
namespace: default
spec:
protocol: http
---
apiVersion: v1