Skip to content

Instantly share code, notes, and snippets.

View jendiamond's full-sized avatar
🏠
Working from home

JenDiamond jendiamond

🏠
Working from home
View GitHub Profile
@jendiamond
jendiamond / gist:6348401
Last active December 21, 2015 18:39
Exercise 5 - Learn Ruby the Hard Way
# The assignment operator = assigns the string 'Jen Diamond'to the variable name
name = 'Jen Diamond'
# The assignment operator = assigns the integer 44 to the variable age
age = 44 # not a lie
# The assignment operator = assigns the integer 69 to the variable height
height = 69 # inches
@jendiamond
jendiamond / gist:6348432
Last active December 21, 2015 18:39
Exercise 6 - Learn Ruby the Hard Way
# the variable x is being assigned with the following string;
# Using string interpolation the integer 10 is embeded inside the string
x = "There are #{10} types of people."
# the variable binary is being assigned with the string binary
binary = "binary"
# the variable don't is being assigned with the string do_not
do_not = "don't"
@jendiamond
jendiamond / gist:6348514
Created August 27, 2013 00:55
Exercise 7 - Learn Ruby the Hard Way
# the method puts prints the string
puts "Mary had a little lamb."
# the method puts prints the string and using string interpolation
# embeds the variable snow into the string
puts "It's fleece was white as %s." % 'snow'
# the method puts prints the string
puts "Everywhere that Mary went."
@jendiamond
jendiamond / gist:6348607
Created August 27, 2013 01:13
Exercise 8 - Learn Ruby the Hard Way
# the variable formatter is being assigned a series of 4 string formatters
# that will take 4 arguments
formatter = "%s %s %s %s"
# the method puts prints the variable formatter; using string
# interpolation it prints the arguments of integers that follow
puts formatter % [1,2,3,4]
# the method puts prints the variable formatter; using string
# interpolation it prints the arguments of 4 strings that follow
@jendiamond
jendiamond / gist:6348632
Created August 27, 2013 01:17
Exercise 9 - Learn Ruby the Hard Way
# the variable days is assigned in a string
days = "Mon Tues Wed Thu Fri Sat Sun"
# the variable months is assigned with line breaks \n means newline
months = "Jan\nFeb\nMar\nApr\nMay\nJun\Jul\nAug"
# the method puts print the string then on a new line it prints
# the contents of the variable days
puts "Here are the days: ", days
@jendiamond
jendiamond / gist:6348652
Last active December 21, 2015 18:39
Exercise 10 - Learn Ruby the Hard Way
# the variable tabby_cat is assigned the value of the string;
# the \t (backslash t) tabs the line in
tabby_cat = "\tI'm tabbed in."
# the variable persian_cat is assigned the value of the string;
# the \n (backslash n) puts the rest of the string on a new line
persian_cat = "I'm split \non a line."
# the variable backslash_cat is assigned the value of the string;
# the \\ (backslash backslash) prints a backslash character
@jendiamond
jendiamond / gist:6348757
Last active December 21, 2015 18:39
Week 7 Day 30 (Monday, August 26, 2013)

Week 7 Day 30 (Monday, August 26, 2013)

Not Rationale

Jen's Monday

I broke up parts of the rationale page and combined them into other pages instead of adding them on the get started page

per Andre's requests:
Grouping - The section about "groups" should be merged with the page that is linked as "Grouping" in the sidebar.

@jendiamond
jendiamond / gist:6359930
Last active December 21, 2015 20:18
Exercise 11 - Learn Ruby the Hard Way
# the print method prints the following string;
print "What is your name? "
# the variable "name" is assigned the input received from
# the user using the method "gets";
# "chomp" returns the cursor to a new line
name = gets.chomp()
# the print method prints the following string;
@jendiamond
jendiamond / gist:6359985
Created August 27, 2013 22:31
Exercise 12 - Learn Ruby the Hard Way
# the command require is requiring the library open-uri so we can use particular things from it
require 'open-uri'
# the method open is opening the url;
# the method "do" will enact the defined method stated after f
# to each of the lines that follow
open("http://www.ruby-lang.org/en") do |f|
f.each_line {|line| p line}
puts f.base_uri # <URI::HTTP:0x40e6ef2
puts f.content_type # "text/html"
@jendiamond
jendiamond / gist:6369588
Last active December 21, 2015 21:39
Week 7 Day 31 (Tuesday Aug 28th)

Week 7 Day 31 (Tuesday Aug 28th)

Jen's Tuesday

More Improvements and PRs (pull requests)

I worked on some more improvements to the bundler.io site I combined 3 things onto a new page called workflow instead of doing a get-sarted page.

    1. The top blurb.(the part under Bundler's Purpose and Rationale)
    1. A Simple Bundler Workflow from rationale page