Skip to content

Instantly share code, notes, and snippets.

View rosiehoyem's full-sized avatar

Rosie Hoyem rosiehoyem

View GitHub Profile
@rosiehoyem
rosiehoyem / Rosie's Profile
Last active December 23, 2015 18:59
This is my profile info.
Name: Rosie Hoyem
Github: http://github.com/rosalita
Blog: http://rosiehoyem.com/
Tagline: Urbanist, Energy Wonk, Programmer
Profile Picture: http://nyobetabeat.files.wordpress.com/2012/09/avi_026-1.jpg
Treehouse Account: http://teamtreehouse.com/rosiehoyem
CoderWall Account: https://coderwall.com/rosalita
CodeSchool Account: http://www.codeschool.com/users/rosalita
Favorite Websites:
@rosiehoyem
rosiehoyem / Alien PB & J
Created September 24, 2013 03:06
How to build a peanut butter and jelly sammy-samich.
1. Begin by picking up the peanut butter containing and grasp the metal lid. Turn it is a counter clockwise direction until it is dislodged from the container. Place the open jar and cover on the table.
2. Repeat step 1 with the jam jar.
3. Gently grasp the open end of the bread bag an remove the plastic closing mechanism.
4. Reach inside the bag and remove two precut sections, or slices, of the bread substance.
5. Place the two slices of bread slide by side, broad faces down on the plate.
6. Take the knife (the skinny metal object approximately 8 inches long) and insert it into the open peanut butter jar 2 inches, then tilt it to an angle of 30 degrees.
7. Remove the knife and some of the peanut butter material.
8. Light press the flat side of the knift to the large face of one of the pieces of bread gently move the knift paralel to the bread, smearing the peanut butter material over the full face to a depth of between 1/8 to 1/4 inch in thickness.
Repeat step X with the jam jar and the other piece of bread
@rosiehoyem
rosiehoyem / FizzBuzz
Last active December 23, 2015 23:59
FizzBuzz assignment, Sept 25
def fizzbuzz(*num)
num.each do |x|
if x % 3 == 0 && x % 5 == 0
return "FizzBuzz"
elsif x % 3 == 0
return "Fizz"
elsif x % 5 == 0
return "Buzz"
else
return x
@rosiehoyem
rosiehoyem / Quiz - Sept 25
Created September 26, 2013 12:34
Exercise from Sept 25.
# Write a program that tells you the following:
#
# Hours in a year. How many hours are in a year?
# Minutes in a decade. How many minutes are in a decade?
# Your age in seconds. How many seconds old are you?
#
# Define at least the following methods to accomplish these tasks:
#
# seconds_in_minutes(1)
# minutes_in_hours(1)
@rosiehoyem
rosiehoyem / Tweet Shortener
Last active December 24, 2015 02:09
Homework, Day 4
=begin
Write a method that will take a tweet, search it for
words that you can substitute, and return a substituted string
tweet. For instance, the tweet "Hello to you, I'm at home"
would become "Hi 2 u, I'm @ home". The client has provided
the following acceptable substitutes. => e
Objectives
1. Write a method to shorten a string based on the allowed substitutes
@rosiehoyem
rosiehoyem / Conference Badges
Last active December 24, 2015 02:09
Ruby homework, day 4
=begin
1. print phrases with names
2. create array with phrases
3. assign rooms to speakers
4. create another array with speaker welcome
=end
# "Hello, my name is _____."
name = ["Edsger", "Ada", "Charles", "Alan", "Grace", "Linus", "Matz"]
@rosiehoyem
rosiehoyem / Vowels
Created September 27, 2013 13:10
Ruby homework, day 4.
=begin
Let's go back to the exercise where we determined what
is and isn't a vowel. With ruby, there's always more than
one way to do something and get the same result.
Assuming vowels a,e,i,o,u:
#1 Write a method that returns whether a given letter is a vowel,
using if and elsif
@rosiehoyem
rosiehoyem / Hash Homework - Day 6
Last active December 24, 2015 09:29
All homework from Sept 31st.
# A movie collection that organizes by genres
# Recipes with ingredients
# User profiles where each user has a list of favorite colors along
# with 3 personal essays, essay_1, essay_2, essay_3
movie_collection = {
:comedy => ["Dumb and Dumber", "Billy Madison", "American Pie"],
:action_adventure => ["Indiana Jones", "Die Hard", "Terminator"],
:documentary => ["Man on a Wire", "Exit Through the Gift Shop"]
}
@rosiehoyem
rosiehoyem / Pigeon Organizer
Created October 3, 2013 12:56
Hash homework day #8, pigeon organizer
########################
# NYC PIGEON ORGANIZER #
########################
pigeon_data = {
:color => {
:purple => ["Theo", "Peter Jr.", "Lucky"],
:grey => ["Theo", "Peter Jr.", "Ms .K"],
:white => ["Queenie", "Andrew", "Ms .K", "Alex"],
:brown => ["Queenie", "Alex"]
@rosiehoyem
rosiehoyem / anagram.rb
Created October 7, 2013 15:06
Anagram TO DO for Monday, October 7.
class Anagram
attr_accessor :word
def initialize(word)
@word = word
end
def match(array)
@word = @word.chars.sort
array.select { |element| element.chars.sort == @word }