Skip to content

Instantly share code, notes, and snippets.

@Ahnita
Ahnita / About
Last active August 29, 2015 14:21
About Ahn
<!doctype html>
<html lang ="en">
<head>
<meta charset = "utf-8">
<link href="css/about_styles.css" rel="stylesheet">
<title>About Ahn Bustamante</title>
<!--[if lt IE 9]>
<script src = "dist/html5shiv.js"></script>
@Ahnita
Ahnita / Contact details
Last active August 29, 2015 14:21
Contact
<!doctype html>
<html lang ="en">
<head>
<meta charset = "utf-8">
<link href="css/contact_style.css" rel="stylesheet">
<link href="css/normalize.css" rel="stylesheet">
<title>Contact Ahn Bustamante</title>
<!--[if lt IE 9]>
<script src = "dist/html5shiv.js"></script>
@Ahnita
Ahnita / Better CSS
Last active August 29, 2015 14:21
Index
/* Nav Bar */
nav li ul {
float: right;
width: 100%;
position: fixed;
letter-spacing: 0.05em;
font-family: 'Josefin Sans', serif;
color: #FAFFFF;
z-index: 5;
display: inline-block;
.nav ul li {
display: inline-block;
padding: 20px 10px 20px;
}
.nav ul li a {
text-transform: uppercase;
letter-spacing: 0.05em;
font-family: 'Josefin Sans', serif;
color: #FAFFFF;
@Ahnita
Ahnita / kitties.js
Last active August 29, 2015 14:24
JS
var myKitties = [ { title: "Moderne Manila", pic: "https://www.petfinder.com/wp-content/uploads/2012/09/Blog-Kitty-Cam-solo.jpg" },
{ title: "Second Project", pic: "http://www.animal-photography.com/thumbs/red_tabby_long_hair_kitten_~AP-0UJFTC-TH.jpg" },
{ title: "Third Project", pic: "http://www.animal-photography.com/thumbs/silver_tabby_kittens~AP-0JO6Y9-TH.jpg" },
];
$(document).ready(function(){
for (var i=0; i<myKitties.length; ++i) {
$("#" + i).css("background-image", "url(" + myKitties[i].pic + ")");
};
@Ahnita
Ahnita / navbar.css
Last active August 29, 2015 14:24
Navbar
/* Nav Bar */
nav li ul {
float: right;
width: 100%;
position: fixed;
letter-spacing: 0.05em;
font-family: 'Josefin Sans', serif;
color: #FAFFFF;
z-index: 6;
display: inline-block;
@Ahnita
Ahnita / program.rb
Last active August 29, 2015 14:25
Ruby
def greeting #here we say def to define a method and put the name of our method
puts "Please enter your name:"
name = gets.chomp
puts "hello" + " " + name #here's the code inside our method
end #and here we end or close our method
greeting
@Ahnita
Ahnita / Modal script.js
Last active August 29, 2015 14:25
Updates July 17
$(document).ready(function() {
$('#modal-button').click(function(){
$("#modal-dialog").dialog();
});
});
@Ahnita
Ahnita / case.rb
Last active August 29, 2015 14:25
Control Flow in Ruby
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!"
@Ahnita
Ahnita / Each.rb
Last active August 29, 2015 14:25
Data Structures
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(",")}."
food_array.each do |food|
puts "I like #{food} too!"