Skip to content

Instantly share code, notes, and snippets.

View MatthewYee92's full-sized avatar

Matthew Y MatthewYee92

View GitHub Profile
@MatthewYee92
MatthewYee92 / docker.md
Last active November 17, 2019 01:36 — forked from Shurlow/docker.md
Intro to Docker and Docker Compose

Intro Docker & Docker Compose

Objectives

  • Explain what Docker is
  • Explain why Docker is useful
  • Build an image with the docker CLI
  • Build an image with a Dockerfile
  • Use docker-compose to build and run multiple containers
@MatthewYee92
MatthewYee92 / rest-express.md
Last active June 17, 2019 18:14 — forked from Shurlow/rest-express.md
REST & Express lesson notes

REST & Express

Objectives

  • Describe the concept of resources in relation to REST and APIs
  • Identify RESTful conventions for API routes
  • Explain what express is and why it's useful
  • Build RESTful routes using express

REST

var country_list = ["Afghanistan","Albania","Algeria","Andorra","Angola","Anguilla","Antigua & Barbuda","Argentina","Armenia","Aruba","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Bosnia & Herzegovina","Botswana","Brazil","British Virgin Islands","Brunei","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Cape Verde","Cayman Islands","Chad","Chile","China","Colombia","Congo","Cook Islands","Costa Rica","Cote D Ivoire","Croatia","Cruise Ship","Cuba","Cyprus","Czech Republic","Denmark","Djibouti","Dominica","Dominican Republic","Ecuador","Egypt","El Salvador","Equatorial Guinea","Estonia","Ethiopia","Falkland Islands","Faroe Islands","Fiji","Finland","France","French Polynesia","French West Indies","Gabon","Gambia","Georgia","Germany","Ghana","Gibraltar","Greece","Greenland","Grenada","Guam","Guatemala","Guernsey","Guinea","Guinea Bissau","Guyana","Haiti","Honduras","Hong Kong","Hungary","Iceland"
@MatthewYee92
MatthewYee92 / deepClone.js
Created June 6, 2019 17:36
Creates a deep clone of an object. Use recursion. Use Object.assign() and an empty object ({}) to create a shallow clone of the original. Use Object.keys() and Array.prototype.forEach() to determine which key-value pairs need to be deep cloned.
const deepClone = obj => {
let clone = Object.assign({}, obj);
Object.keys(clone).forEach(
key => (clone[key] = typeof obj[key] === 'object' ? deepClone(obj[key]) : obj[key])
);
return Array.isArray(obj) && obj.length
? (clone.length = obj.length) && Array.from(clone)
: Array.isArray(obj)
? Array.from(obj)
: clone;
@MatthewYee92
MatthewYee92 / problem-solving-process.md
Last active May 29, 2019 20:59 — forked from Shurlow/problem-solving-process.md
Problem Solving Process Lesson Notes

Problem Solving Process

Objectives

  • Describe the process of solving a problem
  • Solve a problem using a specific problem solving technique

Process

Turn to your neighbor and describe a problem solving process that you've used in the past