This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'nokogiri' | |
require_relative 'utils' | |
require 'open-uri' | |
class Scraper | |
def initialize(path) | |
@doc = Nokogiri::HTML(File.open(path)) | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.container { | |
margin: 20px auto; | |
width: 600px; | |
padding: 0px 20px 20px 20px; | |
border: 1px dotted black; | |
} | |
.racer_table td { | |
background-color: white; | |
height: 20px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<link rel="stylesheet" href="http://cdn.jsdelivr.net/normalize/2.1.0/normalize.css"> | |
<link rel="stylesheet" href="main.css"> | |
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800"> | |
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,900"> | |
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css"> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// shorthand for $(document).ready(); | |
$(function(){ | |
$("form").submit(function(e) { | |
e.preventDefault(); | |
$('#error').html(""); | |
var password = this.password.value; | |
var email = this.email.value | |
console.log(password); | |
var check_email = /^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$/; | |
var check_length = /.{8,}/; |
- Download this application skeleton.
- Convert the app to use AJAX.
- Add any files you changed to your gist and submit your code.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#main-content').css("background-color", "blue"); | |
$('h2').css("background-color", "pink"); | |
$( "h1, h2" ).css('font-style', 'italic' ); | |
$('.select-menu-button-gravatar').find('img').attr('src', "http://upload.wikimedia.org/wikipedia/commons/2/22/Turkish_Van_Cat.jpg"); | |
$("ol").find('li').animate({height: "+=50"}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//------------------------------------------------------------------------------------------------------------------ | |
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here. | |
//------------------------------------------------------------------------------------------------------------------ | |
Zoo = {"animal" : "legs"} | |
console.log(Zoo["animal"]) | |
function Animal(species, legs) { | |
this.species = species; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//------------------------------------------------------------------------------------------------------------------ | |
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here. | |
//------------------------------------------------------------------------------------------------------------------ | |
var Zoo = {} | |
Zoo.init = function(list_of_animals) { | |
this.animals = list_of_animals | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
puts "Type a word (or press enter to finish):" | |
word = gets.chomp | |
word_list = [] | |
word_list << word | |
until word == "" | |
puts "Type a word (or press enter to finish):" | |
word = gets.chomp | |
word_list << word | |
end |
OlderNewer