Skip to content

Instantly share code, notes, and snippets.

View mrflip's full-sized avatar

Philip (flip) Kromer mrflip

View GitHub Profile
@mrflip
mrflip / BasicInstructions.md
Last active March 28, 2024 12:34
Running debezium and kafka connect locally with homebrew

Running Debezium / Kafka Connect locally with homebrew

Initial setup

  • Install all the things: brew install kafka zookeeper maven openjdk
  • Make a directory for plugins: mkdir -p /usr/local/share/kafka/plugins
  • Edit the file /usr/local/etc/kafka/connect-standalone.properties and uncomment the line setting up a plugin path: plugin.path=/usr/local/share/java,/usr/local/share/kafka/plugins,/opt/connectors
  • Start all the things: brew services start zookeeper and brew services start kafka
@mrflip
mrflip / 20130416-todo.md
Last active January 21, 2024 21:06
Elasticsearch Tuning Plan

Next Steps

  • Measure time spend on index, flush, refresh, merge, query, etc. (TD - done)
  • Take hot threads snapshots under read+write, read-only, write-only (TD - done)
  • Adjust refresh time to 10s (from 1s) and see how load changes (TD)
  • Measure time of a rolling restart doing disable_flush and disable_recovery (TD)
  • Specify routing on query -- make it choose same node for each shard each time (MD)
  • GC new generation size (TD)
  • Warmers
  • measure before/after of client query time with and without warmers (MD)
@mrflip
mrflip / Ancient Greek Geometry.md
Last active August 23, 2023 13:28
Ancient Greek Geometry walkthrough / answers / cheats
@mrflip
mrflip / AuthExchange.js
Last active November 7, 2022 23:31
URQL + AWS Cognito Auth code
// --- path: src/graphql/AuthExchange.js
import _ /**/ from 'lodash'
import * as Urql from 'urql'
import { authExchange } from '@urql/exchange-auth'
import { Auth } from 'aws-amplify'
import { Buffer } from 'buffer'
//
import * as Utils from '../utils'
import AppConfig from '../utils/AppConfig'
import * as SessionContext from '../auth/SessionContext'
@mrflip
mrflip / Dockerfile-md2pdf2wtf
Last active October 31, 2022 21:42
md-to-pdf on alpine node box demonstrated
FROM node:18.9-alpine3.15
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
RUN apk add --no-cache chromium nss freetype harfbuzz ca-certificates ttf-freefont ttf-freefont curl gnupg bash dumb-init tar git git-lfs ruby jq python3 postgresql-client nano
RUN addgroup -S tkapi && adduser -S -G tkapi tkapi
WORKDIR /home/tkapi
COPY md2pdf2wtf/ /home/tkapi/md2pdf2wtf/
@mrflip
mrflip / jest.config.cjs
Created October 25, 2022 20:08
Make chai and jest be friends
// make directories for 'tests' and 'src'.
// put this file in the base of your project;
// put all of your code in ./src and all of your tests in ./tests.
module.exports = {
roots: [
'tests',
'src',
],
@mrflip
mrflip / tuning_storm_trident.asciidoc
Last active May 27, 2022 23:59
Notes on Storm+Trident tuning

Tuning Storm+Trident

Tuning a dataflow system is easy:

The First Rule of Dataflow Tuning:
* Ensure each stage is always ready to accept records, and
* Deliver each processed record promptly to its destination
#
# ElasticSearch config file
#
#
# There's no call to see the full current config, but
# modules dump their config variables on startup
#
cluster:
@mrflip
mrflip / Tao Te Chimp.md
Last active September 14, 2020 17:44
Tao Te Chimp: Repeatable Decision Principles for Startups

Tao Te Chimp

Here are some repeatable catchphrases that I’ve learned help startups make decisions. I’d love your feedback on what to add to the list, or what didn’t make any sense.

I mentor in alternate Mondays on the 16th floor at Capital Factory, and I’m glad to set up alternate times if that doesn’t work. Feel free to share this list with others.

Every startup founder should read Running Lean and most of Jason Cohen's Blog. More recommended books are below.

Fundamental Law of Startups

@mrflip
mrflip / maximum_battery_life.md
Created March 19, 2012 08:32
maximum battery life checklist -- use before a long plane flight

Max Battery Life Checklist

Here is a checklist to follow if you want maximum battery life -- for instance if you're about to get on a long plane flight.

10 hour battery life on a non-SSD Macbook Pro 17"

Low power use checklist

With power connected: