Skip to content

Instantly share code, notes, and snippets.

View goldenll's full-sized avatar

Lauren Golden (she/her) goldenll

View GitHub Profile
@goldenll
goldenll / gist:287bf24ab07455b1494ea504723ab752
Created May 31, 2023 17:25 — forked from arjunvenkat/gist:1115bc41bf395a162084
Seeding a Rails database with a CSV file

How to seed a Rails database with a CSV file

1. Setup

First, Create a folder inside of lib called seeds

Put your CSV file example.csv into the lib/seeds folder. In the example below, the file is called real_estate_transactions.csv

Make sure you've created a resource with the appropriate columns to match your seed data. The names don't have to match up.

@goldenll
goldenll / rails_7_cheatsheet.md
Created May 11, 2023 15:18 — forked from cjsim89/rails_7_cheatsheet.md
Rails 7 Cheatsheet

Rails v7.0.4 Cheatsheet

Updated by: Chris Simmons, based on the 5.2 Cheatsheet by Scott Borecki.

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

Notes About this Cheatsheet

  • Rails version v7.0.4. Run $rails -v to check your Rails version number.
  • Code snippets in this cheatsheet starting with $:
  • Run from the terminal, usually within your project directory.

B2 Intermission Work

Answer these Check for Understanding questions as you work through the assignments.

HTML

  1. What is HTML? the standard markup language for Web pages (Hyper Text Markup Language); HTML is not case sensitive
  2. What is an HTML element? An HTML element is defined by a start tag, some content, and an end tag; the element is everything from the start tag to the end tag; Some HTML elements have no content (like the <br> element). These elements are called empty elements. Empty elements do not have an end tag
  3. What is an HTML attribute? provides additional information about HTML elements:
  4. What is the difference between a class and an id? When would you use one vs. the other? the class attribute is often used to point to a class name in a style sheet; it can also be used by a JavaScript to access and manipulate elements with the specific class name; the id attribute specifies a unique id for an HTML element; the value of the id attribute must be unique within the HTML document; th

Beyond Mod 0

There is a little over a month between the end of Mod 0 and beginning of Mod 1. I want to make sure I am using this time wisely to set myself up for success in Mod 1. My plan has two main areas of focus: continued coding practice and personal tasks.

Continued coding practice:

I have learned so much over the last few weeks of Mod 0. I want to make sure I keep these skills sharp. I have identified tasks I will be completing to minimize the loss of this new information before Mod 1.

  • weekly independent coding practice and review on Saturdays and Sundays during Simon's nap from 1-4pm
    • type out handwritten notes so they are easily searchable
  • reach out to backenders and see if they want to setup a Zoom meetup (tbd)
  • March 18: full review of Mod 0 materials and assignments
  • March 19: pre-read the Mod 1 week 1 materials

Guiding Questions

  1. How would you describe your preferred working style? My working style is focused and efficient. I have come to recognize the value and scarcity of my time so I try to make the most of my time by using it efficiently. Just like I don't want to be distracted with work during my family time, I also don't want to be distracted by things in my personal life when I want to focus on work.

  2. What strengths do you bring to a team? I am a good listener, I have an easy time understanding other people's positions even when I do not agree with them. Being able to understand people and communicate effectively makes me a good teammate.

  3. What’s gone well or poorly in your previous group project settings? Well: ensuring everyone has the opportunity to be heard and have input; communication (for the most part); time management

@goldenll
goldenll / git_cfu.md
Last active February 1, 2023 18:36 — forked from kaitvan/git_cfu.md

Git - Check For Understanding

Git Workflow

Copy and paste all of the Terminal text from this process below (not just the history):

Last login: Wed Feb  1 10:38:28 on ttys000
laurengolden@MacBook-Pro ~ % cd
laurengolden@MacBook-Pro ~ % cd turing_work 0mod

Calendaring - CFU

Mod 0

mod_0_calendar

Mod 1

mod_1_week_1_calendar