Skip to content

Instantly share code, notes, and snippets.

@kellishouts
kellishouts / Ruby-OOP-Example
Created January 30, 2015 01:20
ROOP: Ruby OOP Example
// oop.rb
class Animal
# properties
attr_accessor :name, :last_ate
# constructor
def initialize( name )
@name = name
puts "made an Animal named #{name}"
@kellishouts
kellishouts / Python-OOP-Example.py
Created January 30, 2015 01:42
Python OOP Example
// oop.py
# class definition (blueprint)
class Animal:
# class constructor method
def __init__(self, name):
# instance properties
self.name = name
self.last_ate = None
@kellishouts
kellishouts / JS-OOP-Example.js
Created January 30, 2015 02:45
Javascript OOP Example
// oop.js
// Class Definition (is Capitalized)
function Animal ( name ) {
// class constructor
// instance properties
this.name = name;
this.last_ate = null;
console.log('created a new Animal named', this.name);
@kellishouts
kellishouts / selectingdom.md
Last active August 29, 2015 14:14
Selectingdom

Selectingdom

1. Write a style declaration (or set of declatations) that will: (a) make "Fire Kingdom" red, and (b) make everything else grey.

 <ul>
  <li class="kingdoms">
  	Kingdoms
    <ul>
      <li id="fire_kingdom">Fire Kingdom</li>
@kellishouts
kellishouts / Out_of_this_World_Styling.md
Last active August 29, 2015 14:14
Out of this World: Styling

Out of this World: Styling

Setup

  • Create a new branch from the Out of This World project.
  • Set up a server to run the project.
  • In your project directory, create a directory called 'stylesheets'.
  • Inside the stylesheets directory, create an external stylesheet called styles.css
  • In your index document, link to the external stylesheet.
  • Besides adding the link to the stylesheet, do not add any additional markup to the index file.
  • In the external stylesheet, style the page to meet the following requirements.
@kellishouts
kellishouts / Out_of_this_World_Lists.md
Last active August 29, 2015 14:14
Out of This World: Lists

Out of this World: Lists

Setup

  • Create a new branch from the Out of This World project.
  • Set up a server to run the project on localhost.
  • Optional: completely wipe the content of your old stylesheet and start over.
  • do not add any additional markup to the index file.
  • In the external stylesheet, style the page to meet the following requirements.

Requirements

@kellishouts
kellishouts / css_properties.md
Last active August 29, 2015 14:14
Basic CSS Properties to MASTER

Level 1:

Spacing

  • margin
  • padding
  • this combo: margin:auto; display:block

Text

  • color
  • font-size

Red Green Blue

Exercise with Media Queries

Create a standard html5 setup linking an external stylesheet.

index.html
stylesheets/
 styles.css
@kellishouts
kellishouts / index.html
Created February 6, 2015 02:59
Out of This World Markup
<html>
<head>
<meta charset="UTF-8">
<title>Out of This World</title>
<link rel="stylesheet" href="/stylesheets/styles.css">
</head>
<body>
<header>
<h1 id="title">Cosmos</h1>
<h2 id="subtitle">Hearts of the Stars Euclid</h2>
@kellishouts
kellishouts / Out_of_this_World_Responsive.md
Last active August 29, 2015 14:14
Out of this World: Responsive & Multi-Column

Out of this World: Responsive

Setup

  • Create a new branch from the Out of This World project.
  • Set up a server to run the project on localhost.
  • Optional: completely wipe the content of your old stylesheet and start over.
  • In the external stylesheet, style the page to meet the following requirements.
  • You CAN modify the HTML markup.
  • No javascript