Skip to content

Instantly share code, notes, and snippets.

View shayan-golafshani's full-sized avatar
🍦
need icecream

Shayan shayan-golafshani

🍦
need icecream
  • SendGrid
  • Albuquerque, NM
View GitHub Profile
@shayan-golafshani
shayan-golafshani / technical_challenges_reflections.md
Created September 17, 2021 16:09
A git about how I was able to focus on my technical challenges
  • Write a brief reflection on your process this week
    • What do you want to continue working on?
    • How will you continue working on it?
    • How can you keep yourself accountable? (ex. meet with peers, meet with a mentor, continue with weekly reflections, etc.)

My process this week involved really reading a problem and trying to understand what it’s asking. Then I try to speak out the problem in normal English. Then from there I write out more code-like pseudo-code and attempt to write out the rest of the code, while explaining my process.

- I want to continue working through the rest of the problems that are left on the list and working through Leetcode or Codewars problems as well. I particularly want to work on problems that run through recursion. 
- I will continue working on it by setting an hour or so aside at night to work through these problems when I am done working on PD.
  • I can keep myself accountable by messaging my peers Shawn and the peers in this group and asking them abo

React Router Prework

This gist contains a short assignment I'd like everyone to complete before our formal lesson. The prework involves reading some of the React Router documentation, and will allow us to keep the lesson more hands on.

Instructions

  1. Fork this gist
  2. On your own copy, go through the listed readings and answer associated questions

You will not be turning this in; it's for your own understanding/learning/benefit 😁

What is a "data model", and how does it relate to the DOM in a front-end application?

The data model, is the state of the data that is being stored. For instance in an e-commerce-site the checkout bag is filled with items, somewhere behind the scenes in javascript that data is being stored. The data-model relates to the DOM in a front-end application, because the DOM should be dependent on the data-model and use that to display items, prices, quantities, and descriptions to the User. Additionally, sometimes the user will be interacting with the dom and as a result the data model should update a shopping cart of items, for instance. The data-model essentially becomes the state of truth and the DOM depends on the data-model to portray an accurate representation of the data. Issues can arise when the DOM & Data-Model are not in sync and nasty bugs can occur. An example of this is how movies were stored inside of the state of our app in my Rancid Tomatillos project. The Movies, Cards, and Details components used

@shayan-golafshani
shayan-golafshani / revert-a-commit.md
Created May 16, 2021 21:40 — forked from gunjanpatel/revert-a-commit.md
Git HowTo: revert a commit already pushed to a remote repository

Revert the full commit

Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.

git revert {commit_id}'

About History Rewriting

Delete the last commit

Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:

@shayan-golafshani
shayan-golafshani / romcom_DTR
Last active March 30, 2021 23:37 — forked from saberg1/romcom_DTR
romcom_DTR
Project: romcom
Group Member Names: Shayan G & Steven B
Goals and Expectations for the Project (What does each group member hope to get out of this project? What do we want to achieve as a team? How will we know that we're successful?):
We hope to learn how to implement the Javascript that we've been learning into the project. As a team, we want to achieve a clean implementation of the spec with
more extra feautures in place. We also want to have a solid understanding of all the pieces of code and how they connect. We'll know that we're successful, by looking over the spec together and making sure
we have all the implementation in place that we need to have in place. Particularly, we want a better understanding of event bubbling and DOM manipulation through JavaScript.
@shayan-golafshani
shayan-golafshani / pairin.md
Last active March 1, 2021 23:59
Pairin Gist

My Pairin results

image

Checklist/Rubric

Part I: Creating Directories and Files; Initializing Git and Pushing to GitHub

  • I named my directories correctly.
  • I named my files correctly.
  • I structured my files and directories correctly.
  • I made only one initial commit.
  • I pushed my initial commit to GitHub.
@shayan-golafshani
shayan-golafshani / Shayan_Golafshani_markdownPractice.md
Last active February 22, 2021 04:12
Shayan_Golafshani_markdownPractice.md

Beginner's Guide to Data Types (JavaScript)

How to Google:

Keep your Google searches, short & sweet.

split() Javascript

The split method in Javascript, will take in a String as a parameter and then it will split the string to an array of substrings. If two “” are used wit no space in betweeen, it will separate each character including white space. However, if you use “ “ as a parameter to the method/ function then it will split the string by each word, based on the single whitespace character in between the parenthesis.