Skip to content

Instantly share code, notes, and snippets.

View GraySmith00's full-sized avatar

Gray Smith GraySmith00

View GitHub Profile

Custom React Hooks

useForm

import {useState} from 'react';

export const useForm = () => {
  const [values, setValues] = useState(initialValues);
  

Basic Commands

build

docker build -t graysmith00/image-name .

run

docker run -p 8000:8000 image-name

list all images

docker image ls

@GraySmith00
GraySmith00 / History|-1040aa0|entries.json
Last active September 13, 2022 19:05
Visual Studio Code Settings Sync Gist
{"version":1,"resource":"file:///Users/p2863911/Documents/charterProjects/agency-site-ui/src/components/admin/MemberCard/MemberCard.tsx","entries":[{"id":"sCaG.tsx","timestamp":1653057879377},{"id":"IeWB.tsx","timestamp":1653057902994},{"id":"xPRx.tsx","timestamp":1653058000997},{"id":"ovNU.tsx","timestamp":1653102819212},{"id":"1MCy.tsx","timestamp":1653102861362},{"id":"Lpwi.tsx","timestamp":1653102916010},{"id":"eslb.tsx","timestamp":1653102937727},{"id":"bD1n.tsx","timestamp":1653102982640},{"id":"7Ly2.tsx","timestamp":1653102997451},{"id":"Yqdg.tsx","timestamp":1653103016859},{"id":"70f7.tsx","timestamp":1653103033393},{"id":"lLsd.tsx","timestamp":1653103108306},{"id":"rTde.tsx","timestamp":1653103208710},{"id":"ujDq.tsx","timestamp":1653103225038},{"id":"w1Ov.tsx","timestamp":1653103250962},{"id":"a9v2.tsx","timestamp":1653103276731},{"id":"0tq5.tsx","timestamp":1653103366211},{"id":"9lWR.tsx","timestamp":1653103486264},{"id":"4PpY.tsx","timestamp":1653103500964},{"id":"3JPE.tsx","timestamp":16531036769

You Do: Individual Story-writing

Write: Reflect on your experience entering your new career in the software industry and write a draft of your story, answering the questions who are you, why are you here, what's next? Think about how others might root for you as a character and what's at stake for you in your career transition. Consider:

  • tie together math/finance and music
  • passion stemming from first coding courses

Computer Science Fundementals

Recursion

  • a function that calls itself
  • Base Case: a terminating scenario that does not use recursive power to produce an answer.
  • Recursive Case: A set of instructions, moving towards the base case, that end in a call to the same function.
  • Ex.) Factorial:
function factorial(n) {
  if (n <= 1) {

DTR: Define the Relationship

Use this template to when conducting DTR with your project partners. It's recommended that you copy/paste this template into your own gist each time you conduct a DTR to take notes on the conversation.

Guiding Questions to Define The Relationship:

  • What are your learning goals for this project? What drives us in this project?

To move ahead with our javascript knowledge and have a better understanding of working with local storage and data in general.

  • What is your collaboration style? How do you feel about pair programming vs. divide-and-conquer approaches?\

Javascript 'this' Binding

What is 'this'?

  • A reserved keyword in JavaScript.
  • The purpose for 'this' is that it allows us to re-use functions with different context.
  • The value of 'this' is usually determined by how a function is invoked. ('execution context').
  • When a function is called, 2 special keywords are given to that funciton: arguments and this
  • Every time a function is run, the keyword 'this' is defined for that function.
  • Can be determined using four rules (global/window binding, object/implicit binding, explicit binding, new binding).

1. Global Context

DTR: Define the Relationship

Use this template to when conducting DTR with your project partners. It's recommended that you copy/paste this template into your own gist each time you conduct a DTR to take notes on the conversation.

Guiding Questions to Define The Relationship:

  • What are your learning goals for this project? What drives us in this project?
  • What is your collaboration style? How do you feel about pair programming vs. divide-and-conquer approaches?
  • How do you communicate best? How do you appreciate receiving communication from others?
  • How would you describe your work style?