Skip to content

Instantly share code, notes, and snippets.

View Sierra-T-9598's full-sized avatar

Sierra Tucker Sierra-T-9598

View GitHub Profile
@Sierra-T-9598
Sierra-T-9598 / heroku_pg_db_reset.md
Created March 31, 2022 19:38 — forked from zulhfreelancer/heroku_pg_db_reset.md
How to reset PG Database on Heroku (for Rails app)?

It's important to note that running this reset will drop any existing data you have in the application

How to reset PG Database on Heroku?

  • Step 1: heroku restart
  • Step 2: heroku pg:reset DATABASE (no need to change the DATABASE)
  • Step 3: heroku run rake db:migrate
  • Step 4: heroku run rake db:seed (if you have seed)

One liner

CORS: Cross-origin resource sharing

It is a protocol that allows servers to recieve request from different domains to bypass a browser security feature that restricts cross-origin HTTP requests that are initiated from scripts running in the browser (Same origin policy)

Why is it necessary?

Allows a server to relax the same-origin policy.

Why is this important for the Capstone?

To make cross-domain requests possible in cases where it is legitimate to do so like working on a full-stack app for Capstone. To make sure we can make safe requests form the browser so developers can get the needed data.

headers: Access-Control-Allow-Origin: https://example.com
@Sierra-T-9598
Sierra-T-9598 / legacy_code_approach.md
Last active March 25, 2022 16:24
Approach to legacy code

Issue: #65 Add error messaging to FE Profile container when phone number is not the right format

Approach:

  • Where will you start in tech codebase, and why did you decide to start there?
    • First get some familiarity with the README see if anything pops out to set the stage for what I should be looking for, also a good way to get a first look at DB schema
    • Take a look at gem file to see what we are working with
    • Take a look at schema and models to see the relationships
    • Now in context of the issue, we are dealing with messaging/phone numbers so I am going to go look for where that functionality is and is tested. In this case, I see that the phone number is part of the SMS API service being consumed by the BE.
    • I see that an error is occuring in the SMS service on the BE if the phone number is not a good format.
  • However, the issue references the error messaging on the FE Profile Container, so I am going to navigate to the FE codebase to find this Profile Container (Javascript). I am
@Sierra-T-9598
Sierra-T-9598 / partner_feedback.md
Last active February 6, 2022 21:46 — forked from megstang/partner_feedback.md
Partner Feedback (Mod 3)

Project Feedback - Viewing Party Lite

Directions

  1. Copy the questions below, and fill them out with feedback for your project partner.
  2. Individually slack your partners the feedback you filled out for them (by end of day).
  3. Before tomorrow, 9am MT, take some time reviewing your partner’s feedback that they sent you.
  4. Tomorrow at 9am you will get on a video call with your partner(s) for the in person partner retro to discuss feedback.

Partner: Mallory Vining

Rails Step By Step “Guide”

Start a new rails project:

Reference: https://github.com/turingschool-examples/task_manager_rails

This will start a new Rails App with postgresql as database and skip the usage of Spring and Turbolinks (method used in task_manager):

rails new task_manager -T -d="postgresql" --skip-spring --skip-turbolinks

@Sierra-T-9598
Sierra-T-9598 / Capybara.md
Created December 1, 2021 18:38 — forked from JCNapier/Capybara.md
Capybara cheatsheet

Capybara Actions

# Anchor
click_link 'Save'

# Button
click_button 'awesome'

# Both above

Checklist/Rubric

To make a copy of this rubric:

  1. Click the button in the upper right-hand corner that says Fork. This is now your copy of the document.
  2. To save your work, click the green button in the bottom right-hand corner. You can always come back and re-edit your gist.

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

  • I named my directories correctly.