Skip to content

Instantly share code, notes, and snippets.

View ZASMan's full-sized avatar
🎯
Coding in Ruby as usual.

Zane ZASMan

🎯
Coding in Ruby as usual.
View GitHub Profile
@ZASMan
ZASMan / navbar
Created September 23, 2015 23:55
Navbar
/* Hacks to change existing Navbar properties */
.navbar {
background-color: #34495e
}
.container {
background-color: #34495e
}
@ZASMan
ZASMan / styles.css
Created October 5, 2015 12:25
styles.css
/*Rules that Apply to Multiple Sections*/
body {
background-color: #000000;
padding-top: 51px;
position: relative;
}
.main-text {
clear: both;
@ZASMan
ZASMan / scripts.js
Last active October 12, 2015 17:43
scripts.js
//Nt needed for document ready-maps
var map;
function initMap() {
map = new google.maps.Map(document.getElementById('map'), {
center: {lat: 38.8895563, lng: -77.0352546 },
zoom: 8
});
}
name="Zane"
def greeting
puts "Zane"
name = gets.chomp
puts "Hello" + " " + name
end
greeting
@ZASMan
ZASMan / program2.rb
Created October 13, 2015 02:16
program2.rb
if (5+5==10)
puts "this is true"
else
puts "this is false"
end
@ZASMan
ZASMan / program3.rb
Created October 13, 2015 02:17
program3.rb
def choose
puts "Do you like programming? Yes or no please."
choice = gets.chomp
case choice.downcase
when "yes"
puts "That\'s great!"
when "no"
puts "That\s too bad!"
when "maybe"
puts "Glad you are giving it a chance!"
@ZASMan
ZASMan / program4.rb
Created October 13, 2015 02:18
program4.rb
3.times do
puts "Hello!"
end
number = 0
#while (number <= 10) do # while this condition is true, do...
#p "the number is now #{number}" # whatever is in this code block
#number += 1 # short for number = number + 1
#end # don’t forget your end
@ZASMan
ZASMan / fav_foods.rb
Last active October 15, 2015 10:27
fav_foods.rb
def food_array
["IceCream", "Pizza", "Rice"]
end
3.times do
puts "Chicken."
food_array << gets.chomp
end
def fav_foods
@ZASMan
ZASMan / cat.rb
Created October 15, 2015 11:11
cat.rb
class Cat
attr_reader :color, :breed
attr_accessor :name
def initialize(color, breed)
@color = color
@breed = breed
@hungry = true
end
def feed (food)
puts "Mmmm, " + food + "!"
@ZASMan
ZASMan / pet.rb
Created October 15, 2015 11:35
pet.rb
class Pet
attr_reader :color, :breed
attr_accessor :name
def initialize(color, breed)
@color = color
@breed = breed
@hungry = true
end
def feed (food)
puts "Mmmm, " + food + "!"