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 lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>Flatiron School - Developing Professionals</title> | |
<meta name="HandheldFriendly" content="True"> | |
<meta name="MobileOptimized" content="320"> | |
<meta name="viewport" content="width=device-width; initial-scale=1.0"> | |
<link type="text/plain" rel="lol" href="/humans.lol/"> |
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
CREATE TABLE user ( | |
id INTEGER PRIMARY KEY, | |
first_name TEXT, | |
email TEXT | |
); | |
CREATE TABLE quiz ( | |
id INTEGER PRIMARY KEY, | |
user_id INTEGER, | |
name TEXT |
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
INSERT INTO user (id, first_name, email) | |
VALUES ( 0, "Josh", "[email protected]"); | |
INSERT INTO user (id, first_name, email) | |
VALUES ( 1, "Aaron", "[email protected]"); | |
INSERT INTO user (id, first_name, email) | |
VALUES ( 2, "Matt", "[email protected]"); | |
INSERT INTO user (id, first_name, email) |
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
INSERT INTO question (content, quizzes_id) | |
VALUES | |
("Who is the father of relational databases?", 2), | |
("What is referential integrity?", 2), | |
("In a one to many relationship, which table contains the foreign key?", 2), | |
("What is a normalized table?", 2), | |
("How many different type of joins are there?", 2); | |
INSERT INTO choices (content, correct, questions_id) | |
VALUES |
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
Show hidden characters
{ | |
"auto_complete_commit_on_tab": true, | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/Solarized Color Scheme (TextMate)/Solarized (light).tmTheme", | |
"ensure_newline_at_eof_on_save": true, | |
"file_exclude_patterns": | |
[ | |
".DS_Store", | |
".tags*", | |
"*.pyc", |
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
# app.rb | |
require 'sinatra' | |
require 'json' | |
require 'data_mapper' | |
DataMapper.setup(:default, ENV['DATABASE_URL']) | |
get '/' do | |
@messages = Message.all |
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
def assert_equal(actual, expected) | |
if expected == actual | |
puts 'pass' | |
else | |
puts "fail: expected #{expected}, got #{actual}" | |
end | |
end | |
def assert(statement) | |
if statement |
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
class JukeBox | |
# attr_accessor :request | |
@@songs = [ | |
"The Phoenix - 1901", | |
"Tokyo Police Club - Wait Up", | |
"Sufjan Stevens - Too Much", | |
"The Naked and the Famous - Young Blood", | |
"(Far From) Home - Tiga", | |
"The Cults - Abducted", | |
"The Phoenix - Consolation Prizes" |
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
# 11.6.12 | |
# Jack Dorsey - creator of Twitter | |
# gem 'rspec' | |
# bundle | |
# rails g rspec: install | |
# in spec, create new folder, models | |
# rails g test_unit: model Song #=> didn't work as expected | |
# create songs_spec.rb |
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
#!bash | |
# | |
# bash/zsh completion support for core Git. | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <[email protected]> | |
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# The contained completion routines provide support for completing: | |
# |
OlderNewer