Skip to content

Instantly share code, notes, and snippets.

# ,o888888o. 8 8888 88 8 8888 8888888888',8888'
# . 8888 `88. 8 8888 88 8 8888 ,8',8888'
# ,8 8888 `8b 8 8888 88 8 8888 ,8',8888'
# 88 8888 `8b 8 8888 88 8 8888 ,8',8888'
# 88 8888 88 8 8888 88 8 8888 ,8',8888'
# 88 8888 `8. 88 8 8888 88 8 8888 ,8',8888'
# 88 8888 `8,8P 8 8888 88 8 8888 ,8',8888'
# `8 8888 ;8P ` 8888 ,8P 8 8888 ,8',8888'
# ` 8888 ,88'8. 8888 ,d8P 8 8888 ,8',8888'
@spencereldred
spencereldred / gist:6735985
Created September 27, 2013 22:15
Spencer's Week One - Not Quiz
#
# This is our first week's !quiz Let's find out what we know.
#
# The ideal range of your motor cycle speed 20 - 55. Over 55 is SCAREE!
# Check if your moto_speed is within that range using boolean (&&, ||)
# operators and comparison operators (== =< >= !=)
# if your moto_speed variable is in the right range print out a good
# message, aka "Wheee!" Otherwise print out an appropriate response.
@spencereldred
spencereldred / gist:6766356
Created September 30, 2013 16:27
Spencer't happy_trails.rb source code
# happy_tails.rb
# Spencer Eldred
# Sept 27, 2013
# Activity:
# You are the manager at HappiTails animal shelter. You need to manage your shelter by storing and manipulating information about clients and animals.
# Object Specs:
# Animal:
# An animal should have a name, an age, a gender, a species, and can have multiple toys.
@spencereldred
spencereldred / gist:6796568
Created October 2, 2013 16:35
Sinatra - stock quote app - stock_app.rb file.
require 'sinatra'
require 'sinatra/reloader'
require 'yahoofinance'
get '/' do
@method = "post"
@action = "/stock"
erb :form
@spencereldred
spencereldred / gist:6817851
Created October 3, 2013 22:05
Spencer's movie.rb file of routes
require 'sinatra'
require 'sinatra/reloader'
require 'typhoeus'
require 'json'
# @query = "Star Wars"
# movie_list_request = Typhoeus.get(
# "http://www.omdbapi.com",
# :params => { :s => @query }
@spencereldred
spencereldred / gist:6830839
Created October 4, 2013 18:53
Essay on Jennifer Dewalt's web developer journey.
You can't possibly teach yourself how to be a web developer in 180 days, right? Yet that is what Jennifer Dewalt did. In her blog, blog.jenniferdewalt.com, Jennifer outlines her approach of making and publishing one web site per day for 180 days. Additionally, each web site is accompanied by a blog post. The entire collection of 180 web sites can be found at jenniferdewalt.com. Her sites start out as small HTML and CSS projects and gain sophistication as she dabbles into the realms of Rails and Node.
Having a well-defined mission and setting goals to reach that mission is what it is all about. A mission statement should be clear, measurable, and time bound. Jennifer's mission, 180 websites in 180 days, is short, sweet, and fits the bill. Rather than by reading books or attending a bootcamp, Jennifer gained the knowledge she needed by relying on "StackOverflow, MDN, CSS Tricks, blogs and demos". (Dewalt)
My mission is to have a job as a web developer by March, 2014. (Earlier would be better, but I don't want t
@spencereldred
spencereldred / gist:6833943
Created October 4, 2013 22:32
Spencer's Week 2 Assessment
Spencer Eldred
October 4, 2013
1.)
My script is loading fine, but separate style sheets aren't working
<!DOCTYPE html>
<html>
@spencereldred
spencereldred / guestbook.rb
Created October 10, 2013 00:46
guestbook app with database. uses the params[:name] and params[:message] to create sql query.
require 'sinatra'
require 'sinatra/reloader'
require 'sqlite3'
db = SQLite3::Database.new('guestbook.sqlite3');
sql = "select * from guestbook;"
sql_name = "select name from guestbook where id = 1"
@result = db.execute(sql);
@spencereldred
spencereldred / rspec_testing.md
Last active January 2, 2016 21:29
RSpec Testing of ruby programs

RSpec Testing

##BDD - Behavior Driven Development #Learing Objectives:

  • Understand BDD development flow

  • Install and configure RSpec

  • Understand basic RSpec blocks: describe, context, it

  • Understand how to write RSpec tests

  • Understand how to run RSpec tests

  • Understand how to make list of attributes and behaviors
@spencereldred
spencereldred / rails_view.md
Last active January 3, 2016 09:19
Rails View Lesson

Rails View

  • Understand steps to set up rails app.

    *

    Start Sublime

    *

    Edit Gemfile - 'pry'

    *

    Bundle Install

    *

    Edit .gitignore file

    *

    Add Bootstrap

  • Understand steps to get rails app running.

    *

    Setup first route

    * Setup first Controller