Skip to content

Instantly share code, notes, and snippets.

View jordanstholmes's full-sized avatar

Jordan Holmes jordanstholmes

View GitHub Profile

Server API

Get restaurant info

  • GET /api/restaurants/:id

Path Parameters:

  • id restaurant id

Success Status Code: 200

Justifying Your Database Management System Choice

Requirements for staff approval of final dbms

See additional sections below for a more in-depth explanation of each of these requirements.

  • DBMS choice must be written out in google doc
  • Must have at least 3 reasons (bullet points) for your choice
  • All justifications must be objective (no subjective justifications)
  • At least 2 of your justifications must discuss DBMS features beyond benchmarking results
  • Justifications must be related back to the nature of your specific service

API Design Cheat Sheet

@jordanstholmes
jordanstholmes / index.html
Created March 23, 2020 19:20
Proxy starter code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="/style.css">
<title>FEC Demo</title>
</head>
<body>
<div id="Info"></div>
<div id="CountDown"></div>
@jordanstholmes
jordanstholmes / finding-answers-online.md
Last active August 17, 2020 06:45
A quick primer on strategies for answering software engineering questions using the internet.

FINDING ANSWERS ONLINE

PREREQUISITE: Get a high-level understanding

First step: Why does this tool/concept exist?

This first step is going to sound trivial. It isn't as trivial as it seems, and a shocking number of people manage to skip it.

Before you do anything else, you must understand WHY the tool or concept you're researching exists. If its purpose is not clear to you, you must clarify that first. Find a short overview of the tool or concept.

A general understanding of its purpose will help orient you as you attempt to understand/use it. The tool/concept has a purpose. If you can't articulate to another person what that purpose is (in a way that feels like it would be genuinely useful to YOU), there's a good chance you will struggle to use the tool effectively.

@jordanstholmes
jordanstholmes / handle-scrollbar-toggle-shift.js
Created February 3, 2019 19:10
Some css for creating a modal and handling the content shift from a disappearing scroll bar
// https://stackoverflow.com/questions/8701754/just-disable-scroll-not-hide-it
// React method
changeView(update) {
// the if else below toggles background scroll off when modal opens
if (update) {
document.body.classList.add(`${styles.modalOpen}`);
} else {
document.body.classList.remove(`${styles.modalOpen}`);
}
# Proxy Config
1 Node Server (which routes requests to each service)
# Service Config
1 Nginx Load Balancer
5 Ec2 Node Server Instances
2 Redis Cache Instances serving the node servers
1 Mongodb
# Loader IO Test
FOR POST
# POST Artillery Config
config:
target: 'http://localhost:1000'
# target: 'http://localhost:9001'
phases:
- duration: 60
arrivalRate: 10
# Artillery Config “stressTest.yml”
config:
target: 'http://localhost:9001'
phases:
- duration: 60
arrivalRate: 20
payload:
path: 'restaurantIds.csv'
fields:
- 'restaurantId'
@jordanstholmes
jordanstholmes / mongoMainQuery.txt
Created November 21, 2018 21:59
Main mongo query
QUERY: collection.findOne({ _id: ObjectId("5bf5c6a0de88b93f579e6437") })
Query took 7.049114 milliseconds
RESULTS:
{ _id: 5bf5c6a0de88b93f579e6437,
restaurantId: 9999989,
name: 'Schroeder and Sons',
address: '438 King Landing, Araton, Louisiana, 62867',
cost: 5,
phone: '267-801-2129',