Skip to content

Instantly share code, notes, and snippets.

View mckornfield's full-sized avatar
🎯
Focusing

Matt Kornfield mckornfield

🎯
Focusing
View GitHub Profile
@mckornfield
mckornfield / combos.csv
Last active October 3, 2023 21:09
DevOps Clue
Suspect Mechanism Room
The DevOps Engineer Deleted The Database
The Software Intern Rebooted The Kubernetes Cluster
The Security Engineer Stopped The Load Balancer
The Senior Architect Encrypted The Prototype that Made it to Production
The New Guy Released a Bug to The Redis Cluster
Brett Tripped Over the Power Cable Leading to The ElasticSearch Cluster
The Application Server
The DNS Server
The Data Center
@mckornfield
mckornfield / install_mongosh.sh
Last active September 19, 2023 18:42
Mongosh install via yum
#!/usr/bin/env bash
cat << EOL | sudo tee -a /etc/yum.repos.d/mongodb-org-7.0.repo
[mongodb-org-7.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/amazon/2/mongodb-org/7.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-7.0.asc
EOL
sudo yum install -y mongodb-mongosh mongodb-database-tools
@mckornfield
mckornfield / five-nines.csv
Created January 4, 2023 02:36
Showing off the five nines availability
% downtime per year downtime per day
90% 36.53 days 2.40 hours
99% 3.65 days 14.40 minutes
99.9% 8.77 hours 1.44 minutes
99.99% 52.60 minutes 8.64 seconds
99.999% 5.26 minutes 0.864 seconds
@mckornfield
mckornfield / README.md
Last active July 20, 2019 14:00
Lemonade Stand Site

What does our site need?

  • The name of the stand, "Acme Lemonade Stand"
  • First, a few pictures of lemonade and maybe even of a lemonade stand
  • A description of how long we've been making Lemonade, something like:
Our team of lemonade makers is committed to excellence. We've been in the lemonade industry for over 40 years,
working with different strains of lemons, different growers and different squeezing techniques. We are unmatched
in quality and price.
@mckornfield
mckornfield / ReadFile.java
Last active December 1, 2017 19:45
Read Large File
import java.io.*
/*
Given a One GB file that prints statuses, determine a faster way to read the file and determine the current status.
To simplify, the file will only contain nothing, or a Status with a color, as well as a time (here just given as
an integer from 0 to the Length of the File - 1)
Another scenario could be that we have two files, one at one snapshot in time and one at a later snapshot in time,
with additional statuses added since the reading of the first file.
A third scenario has a status omitted, so a default status must be put if that status does not show up in the logs.