Skip to content

Instantly share code, notes, and snippets.

@ThisBenRoberts
ThisBenRoberts / index.html
Last active August 29, 2015 14:26
Interactive Website
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<title>Hello World!</title>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.css" rel="stylesheet">
@ThisBenRoberts
ThisBenRoberts / cat.rb
Created August 7, 2015 02:24
my_cf_project_final_copy_ex_25
class Pet
attr_reader :color, :breed
attr_accessor :name
def initialize(color, breed)
@color = color
@breed = breed
@hungry = true
end
@ThisBenRoberts
ThisBenRoberts / cat.rb
Created August 6, 2015 22:57
my_cf_project_final_copy_ex_24
class Cat
attr_reader :color, :breed
attr_accessor :name
def initialize(color, breed)
@color = color
@breed = breed
@hungry = true
end
@ThisBenRoberts
ThisBenRoberts / fav_foods.rb
Created August 6, 2015 01:40
my_cf_project_final_copy_ex_23
def fav_foods
food_array = []
3.times do
puts "Name a favorite food."
food_array << gets.chomp
end
p food_array
puts "Your favorite foods are #{food_array.join(", ")}."
@ThisBenRoberts
ThisBenRoberts / program2.rb
Created August 5, 2015 21:57
my_cf_project_final_copy_ex_22
if (5+5==10)
puts "this is true"
else
puts "this is false"
end
@ThisBenRoberts
ThisBenRoberts / program.rb
Created August 5, 2015 21:09
my_cf_project_final_copy_ex_21
# puts "helo"
def greeting
puts "Please enter your name:"
name = gets.chomp
puts "Hello" + " " + name
end
greeting
@ThisBenRoberts
ThisBenRoberts / index.html
Last active August 29, 2015 14:26
my_cf_project_final copy_ex_20
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<title>Hello World!</title>
<!-- jQuery is required for Bootstrap to work -->
<script src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.css" rel="stylesheet">
@ThisBenRoberts
ThisBenRoberts / index.html
Created July 28, 2015 00:50
my_cf_project_final copy_ex_19
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<title>Hello World!</title>
<!-- jQuery is required for Bootstrap to work -->
<script src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.css" rel="stylesheet">
@ThisBenRoberts
ThisBenRoberts / index.html
Created July 27, 2015 22:02
my_cf_project_final copy_ex_18
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<title>Hello World!</title>
<!-- jQuery is required for Bootstrap to work -->
<script src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.css" rel="stylesheet">
@ThisBenRoberts
ThisBenRoberts / conact.html
Created July 27, 2015 04:23
my_cf_project_final copy_ex_17
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<title>Contact</title>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.css" rel="stylesheet">