Skip to content

Instantly share code, notes, and snippets.

View dhkaneda's full-sized avatar

Dennis Huynh dhkaneda

View GitHub Profile
@dhkaneda
dhkaneda / TMO-Docker Checkpoint Grading Rubric.txt
Last active November 18, 2020 16:18
TMO-Docker Checkpoint Grading Rubric
Total points - 10pt
Passing - 8pt
Main outcome of lesson: Student is able to Dockerize app, expose correct ports, and push image to Registry.
ARGS/ENV, nice to have (topic to be reinforced in upcoming lessons)
1. 8pt - Can pull image to local machine from provided Docker Hub Image URL
2. 1pt - Has documentation for `docker run` (port mapping)
3. 1pt - Receives OK 200 from GET to provided mapped port
4. (+) - Running `docker history <image-name>` on student's image shows correct usage of ARGs/ENVs
@dhkaneda
dhkaneda / k6stresstest-initial.txt
Last active April 12, 2020 01:15
k6stresstest-initial - 124 rps
/* eslint-disable import/no-unresolved */
import http from 'k6/http';
import { sleep } from 'k6';
export const options = {
vus: 200,
duration: '60s',
};
export default function () {
@dhkaneda
dhkaneda / SDC Sample Core Query + Results
Created April 9, 2020 06:09
SDC Sample Core Query + Results (Postgres vs Cassandra)
/////////////// READ - Postgres ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
reservation_service=# explain analyze select * from bookings where bookings.locationid=240132;
QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------------
Gather (cost=1000.00..433036.91 rows=12 width=102) (actual time=8643.416..10070.472 rows=8 loops=1)
Workers Planned: 2
Workers Launched: 2
-> Parallel Seq Scan on bookings (cost=0.00..432035.71 rows=5 width=102) (actual time=7491.406..10063.379 rows=3 loops=3)
Filter: (locationid = 240132)
Rows Removed by Filter: 6666664
@dhkaneda
dhkaneda / installCassMacUbuntu.txt
Last active July 10, 2020 00:37
Cassandra Mac OS X + Ubuntu 18.40 Installation (04-04-2020)
------------------------------------------------------------------------
Contents
1. Install Cassandra on Mac OS X (tested with Mojave) - line 6
2. Install Cassandra on Ubuntu (18.04, tested on 19.10) - line 31
----- Installing Cassandra on Mac OS X (mojave) (est time. 15 min) -----
Have homebrew installed:
> ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
[ be sure to check post install messages to add paths and such if necessary ]
@dhkaneda
dhkaneda / sampleData.js
Last active March 13, 2020 23:10
ABODE - Summary/Contacts Module > Seed Script DEMO with API Call
// url: 'http://localhost:5000/seedProperties'
[
{
contact: [
{
_id: "5e6bdede3285240a2bdbb7cb",
name: "Dewayne Rippin",
title: "Seller's Agent",
rating: 5,