Skip to content

Instantly share code, notes, and snippets.

@edilenedacruz
edilenedacruz / lightning_talk_raw.md
Last active October 21, 2016 23:19
Canine raw feeding

#Introduction#

So, what led me to discover canine raw food?

##Canine diet before World War II

  • Upper class made their own food for their prized dogs
  • Working dogs had a robust diet
  • Lower class families fed table scraps or dead animal carcasses

##Corporate greed

@edilenedacruz
edilenedacruz / 1611_portfolio.md
Last active December 31, 2016 17:17
1611 portfolio

Edilene Da Cruz - M1 Portfolio

Areas of Emphasis

(What did you set out to accomplish this module?)

Rubric Scores

Fill in how you would grade yourself from 1-4 in the following categories this module:

@edilenedacruz
edilenedacruz / cheating_in_cs.md
Created December 12, 2016 05:39
Cheating in computer science

The article pointed to the most important factor when cheating is involved: that the student didn't learn from it. The current educational system is so focused on grades and proceeding to the next step that the student has very little options but to try "everything" to get to the next level/class. This system robbed all of us from the chance of truly learning from the mistakes we make and have an enduring learning.

Other methods to evaluate knowledge are available out there and should be explored. It was to see that the author ensured to reconnect honor to the learning process and that is something that it seems to have been forgotten through the years.

@edilenedacruz
edilenedacruz / instructions.md
Created December 26, 2016 22:07 — forked from kareemgrant/instructions.md
State Capital Assignment - Ruby Hashes and Arrays

State Capital Assignment

This exercise will help you better understand Arrays and Hashes

Use the data provided in state_capitals.rb to write a program that does the following.

  1. Prints out the names of all states that have a population greater than 5 million.

  2. Returns the name of the capital when given the name of the state.

Group Expectations

Group Member Names:

Project Manager:

Defining the Relationship (DTR) Questions:

  1. When are group members available to work together? What hours can each group member work individually? Are there any personal time commitments that need to be discussed?
@edilenedacruz
edilenedacruz / AR.md
Last active February 4, 2017 06:36
ActiveRecord methods

Class.where(method: value) Class.where(method: [value1, value2]) user = User.find(41) orders = Order.group('amount') orders = Order.order(:amount).reverse User.where.not(id: id) items = Item.where.not(id: items_not_included) names = Item.pluck('name') Author.joins(:books).merge(Book.available) .unscope

@edilenedacruz
edilenedacruz / asset_pipeline.md
Last active February 23, 2017 17:01
Asset Pipeline Scavenger Hunt
  1. What does it mean to concatenate files? Find an image of an example concatenated file. Why would we want to concatenate files? It means to bring files together, in one place.

  2. What does it mean to precompile files? What does this have to do with coffeescript and sass files? Precompile files is to use/convert a higher languange into a web browser deliverable language.

  3. What does it mean to minify files? Find an image of an example minified file. Why would we want to minify files? It means to strip out the trailing whitespaces.

  4. Start up the server for Catch ‘em All (rails s) and navigate to http://localhost:3000/assets/application.js. Then open up the code for application.js in your text editor. Why are these not the same?

Intermediate SQL Workshop

  • Run psql
  • You may need to run CREATE DATABASE intermediate_sql;
  • To exit this shell, you can run CTRL d

Create tables

Let's create some tables in the database.

Part I: User Creation

  1. add route for new_user_path
  2. create a UsersController with new action
  3. create new.html.erb
  4. generate user model with password_digest string field
  5. uncomment gem 'bcrypt' in Gemfile and add has_secure_password in User model
  6. add create action in UsersController
  7. implement logic for creating a user
  8. set session[:user_id] in create action