Skip to content

Instantly share code, notes, and snippets.

View JCNapier's full-sized avatar

John Napier JCNapier

View GitHub Profile

Mod 3 Prework Notes

You need to store a user in a database table; what do we need to know about them? (ie, email, password)

  • To store a user in a databse we would need to know first and last name, email, passoword, and maybe a phone number.
  • Depening on the application using the database it might require a mailing address, age, or other important attributes.

How can we store a password in a secure way? (ie, if our database is compromised, how can we protect their passwords from prying eyes)

  • One way is by encrypting stored passwords with a nonreversible cryptographic function so an attacker could not solve the encryprion logic(if it were reversible).
  • The use of salt, which generates two random hashes for a password, and increases the chances of the generated hash being unique to itslef. Salt forces password breaking software to restart everytime (for every password) a code is broken.
@JCNapier
JCNapier / rails_cheatsheet.md
Created December 2, 2021 01:54 — forked from Scott-Borecki/rails_cheatsheet.md
Rails v5.2 Cheatsheet

Rails v5.2 Cheatsheet

Updated by: Scott Borecki

[![LinkedIn: scott-borecki][linkedin-badge]][LinkedIn] [![Email: scottborecki@gmail.com][gmail-badge]][gmail] [![GitHub: Scott-Borecki][github-follow-badge]][GitHub]

Please reach out if you have any comments or suggestions for updates!

@JCNapier
JCNapier / Capybara.md
Created November 26, 2021 18:32 — forked from tomas-stefano/Capybara.md
Capybara cheatsheet

Capybara Actions

# Anchor
click_link 'Save'

# Button
click_button 'awesome'

# Both above

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

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.