Skip to content

Instantly share code, notes, and snippets.

View drmikeh's full-sized avatar

Dr. Mike Hopper drmikeh

  • The Home Depot
  • Atlanta, GA
View GitHub Profile
@drmikeh
drmikeh / new-js-project-setup.md
Last active June 26, 2021 21:05
New JavaScript Project Setup

New JavaScript Project Setup

Package.json

For NodeJS:

"start": "NODE_ENV=production node src/app.js",
"dev": "NODE_ENV=development DEBUG=knex2:query PORT=4000 nodemon src/app.js",
"test:watch": "NODE_ENV=test DEBUG=knex2:query jest --runInBand --watch",
@drmikeh
drmikeh / HelloWorld.java
Created June 19, 2017 15:08 — forked from lolzballs/HelloWorld.java
Hello World Enterprise Edition
import java.io.FileDescriptor;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
public class HelloWorld{
private static HelloWorld instance;
public static void main(String[] args){
instantiateHelloWorldMainClassAndRun();
@drmikeh
drmikeh / sample.adoc
Created January 13, 2017 19:04
AsciiDoc sample

GitHub is now running Asciidoctor 2.0.22.

@drmikeh
drmikeh / cookies-and-tokens.adoc
Created January 11, 2017 23:27
Cookies and Tokens for AuthN

Authentication with AngularJS

Review

Authentication (AuthN) is used to establish and verify a user’s identity. Typically there are 3 functions for the user to perform:

  1. Registration

  2. Login

  3. Logout

Asciidoc on GitHub

@drmikeh
drmikeh / sql-vs.nosql.md
Created December 7, 2016 20:57
SQL vs. NoSQL and Embedded vs. Linked Documents

Mike's Thoughts regarding NoSQL vs. SQL

Wow, lots of discussion here. Here are my thoughts regarding MongoDB, Mongoose, SQL, etc.:

  • In real applications there is no such thing as non-relational data - data will relate to other data and this in inherently a difficult problem to optimize.
  • The trade-off between SQL and NoSQL is between the benefits of ACID vs. the benefits of having a schema-less DB and super high scalability (via partitioning and not having to enforce ACID)
  • Embedded documents should be used very sparingly, otherwise it sets you up for failure.
  • Prefer linking over embedding documents when:
    • the lifecycles differ between the "parent" and the "child" docs (deleting one with/without deleting the other)
  • you need to search or filter for specific child docs
@drmikeh
drmikeh / wdi8-day8.md
Last active November 9, 2016 14:21
Reading, Lessons and Labs for Wednesday, Nov. 9

ATL WDI 8 - Day 8 - Wednesday, Nov. 9, 2016

JavaScript Circuits

  • Continue working through the JavaScript Circuits curriculum.
  • You should work through Unit 3 by EOD today.
  • If a section is moving to slow for you then you can quickly skip through the section until you get to the exercises and quizzes. Do those to check that you understand the material.

WDI Lessons

Lessons and Labs for Tuesday, Nov. 8

Below are the lessons and labs for today. I recommend going over this material first and then following up with the JavaScript Circuits material as a review. When doing the JavaScript Circuits you can skip over the videos and just work through the exercises and quizzes.

Morning

@drmikeh
drmikeh / wdi8-day6.md
Last active November 7, 2016 14:32
ATL WDI Assignments for Monday November 7
@drmikeh
drmikeh / readme.md
Last active August 17, 2016 18:06
Express Movies - MEN Stack Code Along

Express Movies - MEN Stack Code Along

Step 1 - Create the Project

mkdir express-movies
cd express-movies
express -e
npm install