Skip to content

Instantly share code, notes, and snippets.

View laurenhavertz's full-sized avatar

laurenhavertz

View GitHub Profile

Title: Pop-Quiz

Category: Monty Python & the Holy Grail

Question: What is your favorite color?

Answer: Blue... no, YELLOOOOOOOW!

@laurenhavertz
laurenhavertz / Day9.md
Last active December 19, 2015 01:49
WDI Action Adventure

case

like if else without all the if/else

case
  when then 
  when then 
  else
end

end

@laurenhavertz
laurenhavertz / Day10.md
Created June 28, 2013 16:37
WDI Action Adventure

HOMEWORK REVIEW

*should always have the parent/child relationship with the child having the "id"

  • many - many relationships need to create an intermediary table (create id_relationship)
@laurenhavertz
laurenhavertz / Day11.md
Created July 1, 2013 22:29
WDI Action Adventure

Culture

  • DOM- part of the browser that interacts with JS
  • PURPOSE OF JS - adding capability to website
  • jQuery- like a gem for interacting with the browser with JavaScript, makes it easy to use (covered in the cheatsheet)
  • *DOM- document object model
@laurenhavertz
laurenhavertz / Day 12.md
Last active December 19, 2015 06:29
WDI Action Adventure

How to start

  • deconstruct a program and turn it into steps-comment out in the editor
  • start with the most simple step
  • test small things in the console to reaffirm basic assumptions (do my expectations meet my results?)
  • DIVIDE AND CONQUER

##jQuery

  • div divides blocks
  • span divides in-line text
  • grabs something on the page and can see the value
@laurenhavertz
laurenhavertz / jQuerydrills.md
Last active December 19, 2015 06:59
WDI Action Adventure
Task Code
Change the background color of '#target' by script. $('#target').css('background', 'blue');
Change the text in the span, a child of '#target' $('#target span').text('foo:bar');
Create a clone of the span in '#target' and position it under the orgin. $('#target span').clone().insertAfter('#target span');
Change background color of the second of three '.target'. $('.target').eq(1).css('background', 'blue');
Disable the button $('.target button').attr('disabled', 'disabled');
Uncheck the boxes $('.target input').removeAttr('checked');
Move '#child' from '#parent1' to '#parent2' $('#child').appendTo('#parent2');
Make the textbox in '#target' read-only $('#target input').attr('readonly', 'readonly')
@laurenhavertz
laurenhavertz / RubyFresh.md
Last active December 19, 2015 09:59
Practice

####Methods to Know

  • .each
  • .map
  • .inject
  • .reject
  • .length
  • .reverse
  • .push
  • .pop
  • .shift
@laurenhavertz
laurenhavertz / MVC&Rails.md
Last active December 19, 2015 11:49
RUBY RESOURCES

Don't use as a function name

  • alias
  • break
  • def
  • else
  • ensure
  • if
  • next
  • retry
@laurenhavertz
laurenhavertz / MomaApp.md
Last active December 19, 2015 12:59
RAILS RESOURCES

Moma App

  1. create new app rails new moma_app
  2. Sketch out the tables
Artists Paintings
name style
DoB title
nationality date