Skip to content

Instantly share code, notes, and snippets.

View averylizette's full-sized avatar

Avery Neil averylizette

View GitHub Profile
CONFIG:
import http from "k6/http";
import { check } from "k6";
import { Rate } from "k6/metrics";
export let errorRate = new Rate("errors");
export let options = {
thresholds: {
CONFIG:
import http from "k6/http";
import { check } from "k6";
import { Rate } from "k6/metrics";
export let errorRate = new Rate("errors");
export let options = {
thresholds: {
Config:
import http from "k6/http";
import { check } from "k6";
import { Rate } from "k6/metrics";
export let errorRate = new Rate("errors");
export let options = {
thresholds: {
\\\\\\\\\\\\\\\\\\\\\\
\\\\POSTGRES \\\\\\\\\
\\\\\\\\\\\\\\\\\\\\\\
GET THE INFORMATION FOR A LISTING INCLUDING ALL OF ITS PHOTOS:
First, parition for the location and price of a given id:
select * from geninfo where listingid = 9999999;
listingid | location | price | reviewcount | rating | title
One- retrieves all the data for a randomly choosen listing within database.
Data returned from localhost:300/one
{
"_id": "5da0c44225ef4dad666c8e52",
"__v": 0,
"listingId": 4,
"Rating": 5,
@averylizette
averylizette / gist:5dc2ee0d8a83502cb429e943eaf524ad
Created October 10, 2019 16:58
Binary Tree Interview Prompt With Tests
var findValue = (node, targetVal) => {
var result = false;
var accVal = node.value;
var checkNodes = (node) => {
if (!node.children) {
if (accVal === targetVal) {
result = true;
return;
/*
an array of arrays
n number of arrays
if its over
/*