Skip to content

Instantly share code, notes, and snippets.

View mcsuth's full-sized avatar

Seimith Suth mcsuth

View GitHub Profile
@mcsuth
mcsuth / debug_1.md
Last active December 24, 2015 17:09 — forked from OfTheDelmer/debug_1.md

#Debugging (Use The Duck… )

Find the errors in the following

1.)

<html>
<head>
<title>!Quiz - Week 2</title>
</head>
<body>
<center>
<h1>Puppies - wait, is that a puppy?! </h1>
<img id="daPuppies" src="puppies.jpg" width="300" height="auto" />
<h3> don't forget to open your Chrome console </h3>
<button onclick="alert('function needed!');">Bigger Puppies</button>

#Debugging (Use The Duck… )

Find the errors in the following

1.)

<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');

<form>
<input type="text" value="HEllo">
</form>
<ul class="results">
</ul>
<script>
function doSomething(){
var todo = $.Deferred();
$.when("")
.then(function(){
setTimeout(function(){
alert("Our First Thing is Done!!")
}, 500)
@mcsuth
mcsuth / index.md
Created October 21, 2013 23:11 — forked from rstacruz/index.md

Rails Models

Generating models

$ rails g model User

Associations

belongs_to

has_one

rails g UserMailer
class UserMailer < ActionMailer::Base
default from: "fred@fred.com"
def confirm_user(user)
@user = user
@url = 'http://fred.com/login'
mail(to: @user.email, subject: 'Welcome to Fred Site')
end
Please write some tests for your first Project. This is backwards from the way it "should" be
-- haha, some Rspec humor for ya!!
Make sure to include at least one Model test and one Controller test. These are tests for
your Ruby code only.
I will randomly call on students in each class to describe the tests they wrote and why, so
please do your homework! :)
Tomorrow we will learn about testing in JavaScript. If you want to do some reading up ahead