Skip to content

Instantly share code, notes, and snippets.

@marcocerna
marcocerna / index.md
Created October 21, 2013 22:44 — forked from rstacruz/index.md

Rails Models

Generating models

$ rails g model User

Associations

belongs_to

has_one

Intro To Bootstrap

Style and UX

OBJECTIVE
To become familiar with the conceptual elements (grid, navs, navbar, ...) of Bootstrap, and use those tools to design a responsive page layout.
body {
width: 100%;
background-image:url('../img/wavegrid.png');
}
#main_container {
margin: 10px auto;
width: 800px;
}
// name_of_obj.name_of_key_in_object => value_associated_with_that_key
var board = [
[0, 0, 0],
[0, 0, 0],
[0, 0, 0]
];
// Variable to store the winning player.
var winningPlayer= 0;
<html>
<head>
<title>Puppies</title>
<link rel="stylesheet" type="text/css" href="puppies.css">
<script src="puppies.js"></script>
</head>
<body>
<center>
<div class="top">
<h1>Puppies - wait, is that a puppy?! </h1>

##jQuery

###Basics

  • Little bit of background on jQuery
  • How to include it
  • How to make sure it's included and works
  • How to use the documentation to explore methods (in the course of this class)

###Select elements and add property $('#topsquare').addClass('white-text');

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt

#Debugging (Use The Duck… )

Find the errors in the following

1.)

#Debugging (Use The Duck… )

Find the errors in the following

1.)

<!doctype html>
<html>
<head>
<title>ATM</title>
<meta charset="utf-8">
<link rel="stylesheet" href="atm.css">
<script src="atm.js"></script>
</head>
<body>
<div id="content">