Skip to content

Instantly share code, notes, and snippets.

View mwarkentin's full-sized avatar
😃

Michael Warkentin mwarkentin

😃
View GitHub Profile
@mwarkentin
mwarkentin / broken.ts
Created November 17, 2022 18:25
kafkactl fig spec work
const completionSpec: Fig.Spec = {name: "kafkactl",description: "command-line interface for Apache Kafka",subcommands: [{name: ["edit","alter",],description: "alter topics, partitions",subcommands: [{name: ["partition",],description: "alter a partition",options: [{name: ["--replicas","-r",],description: "set replicas for a partition",isRepeatable: true,args: [{name: "replicas",},],},{name: ["--validate-only","-v",],description: "validate only",},],},{name: ["topic",],description: "alter a topic",options: [{name: ["--config","-c",],description: "configs in format `key=value`",isRepeatable: true,args: [{name: "config",},],},{name: ["--partitions","-p",],description: "number of partitions",args: [{name: "partitions",default: "0",},],},{name: ["--replication-factor","-r",],description: "replication factor",args: [{name: "replication-factor",default: "0",},],},{name: ["--validate-only","-v",],description: "validate only",},],},],},{name: ["attach",],description: "run kafkactl pod in kubernetes and attach to it",},
@mwarkentin
mwarkentin / aws-ui-scrubber.tamper
Created August 13, 2020 21:10
TamperMonkey to shorten AWS Service names in console
// ==UserScript==
// @name AWS UI scrubber
// @namespace https://github.com/jamesinc
// @version 1.0
// @description Make AWS Console shortcuts take up less space
// @author James Ducker
// @match https://*.console.aws.amazon.com/*
// @grant none
// @run-at document-end
// ==/UserScript==
{
"meta": { "theme": "paper" },
"basics": {
"name": "Michael Warkentin",
"label": "Operations Engineer",
"picture": "https://miro.medium.com/fit/c/256/256/1*P9n2qIg4n6TsxTU022CySA.png",
"email": "mwarkentin@hey.com",
"phone": "+1 647-880-0174",
"summary": "I'm an Operations Engineer by way of Developer in Toronto with 15 years of experience building and operating web apps. I love building secure, fast, and reliable software - and helping other people to do the same.",
"location": {
@mwarkentin
mwarkentin / clean.yml
Created March 15, 2018 19:43
Convox yml conversion
AWSTemplateFormatVersion: '2010-09-09'
Conditions:
Autoscale: !Equals
- !Ref 'Autoscale'
- 'Yes'
BlankAmi: !Equals
- !Ref 'Ami'
- ''
BlankBuildImage: !Equals
- !Ref 'BuildImage'
@mwarkentin
mwarkentin / aws-ui-shorter-shortcuts.js
Last active January 9, 2020 19:02 — forked from jamesinc/aws-ui-shorter-shortcuts.user.js
A Tampermonkey script to replace various AWS console service names with acronyms, so they take up less space in the shortcuts bar.
// ==UserScript==
// @name AWS UI scrubber
// @namespace https://github.com/jamesinc
// @version 1.0
// @description Make AWS Console shortcuts take up less space
// @author James Ducker
// @match https://*.console.aws.amazon.com/*
// @grant none
// @run-at document-end
// ==/UserScript==
@mwarkentin
mwarkentin / Makefile
Created January 4, 2018 20:00
convox util makefile
APPS=$(shell convox api get /apps --rack="${rack}" | jq --raw-output ".[].name")
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
infoall: ## View application info for all apps on a rack | args: rack
$(foreach app,$(APPS),echo ""; convox apps info --rack="${rack}" --app="${app}";)
envall: ## View environment variables for all apps on a rack | args: rack
@mwarkentin
mwarkentin / convox.txt
Created October 13, 2016 17:58
Manually calling convox's API
curl -v -X "GET" "https://console.convox.com/system" \
-H "rack: kraken" \
-u ":<token>"
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
### Keybase proof
I hereby claim:
* I am mwarkentin on github.
* I am mwarkentin (https://keybase.io/mwarkentin) on keybase.
* I have a public key whose fingerprint is 3B03 4DB7 85DA CFA2 23F7 4BF4 33E7 8673 989C F39E
To claim this, I am signing this object:
@mwarkentin
mwarkentin / watchman-pingdom.md
Last active August 29, 2015 13:57
django-watchman blog post
  1. Create a new check in Pingdom
  2. Give it a name that you'll remember, like accounting-watchman
  3. Set your check interval. We recommend 1m or 5m checks.
  4. Plug in the endpoint url, like `https://accounting.waveapps.com/watchman/
  5. Open up Optional Settings. Under Check for string, change the first dropdown to Should not contain, and add "ok": false in the input field
  6. Test your check, and then save it if everything looks good!