Skip to content

Instantly share code, notes, and snippets.

View askmeegs's full-sized avatar
💭
🦎

Megan O'Keefe askmeegs

💭
🦎
View GitHub Profile
@askmeegs
askmeegs / genkit-flow-rag.ts
Created May 21, 2024 15:37
genkit-flow-rag.ts
import { NextRequest, NextResponse } from "next/server";
import { configureGenkit } from "@genkit-ai/core";
import { firebase } from "@genkit-ai/firebase";
import { retrieve } from "@genkit-ai/ai/retriever";
import { generate } from "@genkit-ai/ai";
import { defineFirestoreRetriever } from "@genkit-ai/firebase";
import { initializeApp } from "firebase-admin/app";
import { getFirestore } from "firebase-admin/firestore";
import { vertexAI } from "@genkit-ai/vertexai";
@askmeegs
askmeegs / ghstats-aug20.txt
Created August 16, 2020 13:31
Megan's github stats - Oct '19 - Aug '20
SELECT repository, type, event AS status, COUNT(*) AS count
FROM (
SELECT type, repo.name as repository, actor.login,
JSON_EXTRACT(payload, '$.action') AS event, created_at
FROM `githubarchive.day.20*`
WHERE actor.login = 'askmeegs' AND
created_at BETWEEN TIMESTAMP('2019-10-19') AND
TIMESTAMP('2020-08-16')
)
GROUP BY repository, type, status ORDER BY repository, type, status;
@askmeegs
askmeegs / frontend-logs.txt
Created June 25, 2020 13:13
RequestsInstrumentor - frontend never is `ready`
➜ ~ kubectl logs -f frontend-7f6946d68-72fb8
2020-06-25 13:12:39 | [DEBUG] | debug | Current configuration:
config: None
bind: [':8080']
backlog: 2048
workers: 1
worker_class: sync
threads: 4
worker_connections: 1000
max_requests: 0
@askmeegs
askmeegs / productcatalogv2-hipster020.yaml
Last active June 22, 2020 17:49
productcatalogv2 - hipstershop 0.2.0
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@askmeegs
askmeegs / java-svc-header.txt
Created June 15, 2020 11:50
java service headers
➜ ~ stern balancereader
+ balancereader-ccb445895-698gw › reader
balancereader-ccb445895-698gw reader ____ _ ____ _
balancereader-ccb445895-698gw reader | __ ) __ _ | | __ _ _ __ ___ ___ | _ \ ___ __ _ __| | ___ _ __
balancereader-ccb445895-698gw reader | _ \ / _` | | | / _` | | '_ \ / __| / _ \ | |_) | / _ \ / _` | / _` | / _ \ | '__|
balancereader-ccb445895-698gw reader | |_) | | (_| | | | | (_| | | | | | | (__ | __/ | _ < | __/ | (_| | | (_| | | __/ | |
balancereader-ccb445895-698gw reader |____/ \__,_| |_| \__,_| |_| |_| \___| \___| |_| \_\ \___| \__,_| \__,_| \___| |_|
balancereader-ccb445895-698gw reader
balancereader-ccb445895-698gw reader $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
balancereader-ccb445895-698gw reader
@askmeegs
askmeegs / vpc-peering-manifests.yaml
Created April 24, 2020 19:06
VPC peering test - manifests
apiVersion: apps/v1
kind: Deployment
metadata:
name: helloserver
spec:
replicas: 1
selector:
matchLabels:
app: helloserver
template:
@askmeegs
askmeegs / install-ilbgateway.yaml
Created April 19, 2020 14:05
install-ilbgateway.yaml
# ILB config source - https://github.com/istio/istio/issues/20033
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
spec:
addonComponents:
grafana:
enabled: true
k8s:
replicaCount: 1
istiocoredns:
@askmeegs
askmeegs / mtls-1.4.2.yaml
Created December 15, 2019 21:18
mtls-1.4.2.yaml
apiVersion: "authentication.istio.io/v1alpha1"
kind: "MeshPolicy"
metadata:
name: "default"
spec:
peers:
- mtls: {}
---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
@askmeegs
askmeegs / install-istio-1.4.2.sh
Created December 15, 2019 21:16
install istio 1.4.2
#!/bin/bash
# Download Istio
WORKDIR="`pwd`"
ISTIO_VERSION="${ISTIO_VERSION:?ISTIO_VERSION env variable must be specified}"
log "Downloading Istio ${ISTIO_VERSION}..."
curl -L https://git.io/getLatestIstio | ISTIO_VERSION=$ISTIO_VERSION sh -
# Prepare for install
@askmeegs
askmeegs / onlineboutique-example.yaml
Created December 13, 2019 00:55
onlineboutique-example.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: emailservice
spec:
selector:
matchLabels:
app: emailservice
template:
metadata: