Skip to content

Instantly share code, notes, and snippets.

View edhends's full-sized avatar
:octocat:

edhends edhends

:octocat:
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<!-- NAME: RIBBON -->
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<title>*|MC:SUBJECT|*</title>
<style type="text/css">
body,#bodyTable,#bodyCell{

###REST vs SOAP APIs###

#####REST = REpresentational State Transfer
considered an architecture
supports multiple data formats
uses HTTP/HTTPSfor transport
uses consistent and understandable naming conventions (makes it easy for public usage of API)
good with any browser because of standard verbs
stateless operations

####CSS Pseudo Classes####

MDN's resource on CSS pseudo classes: https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes

Background:
A CSS pseudo-class is a keyword applied to selectors to specify a certain state of the element. For example, 'hover' is a special state of an 'a' (link) element we might want to apply certain style features to.

Basic syntax:
selector:pseudo-class { property: value;

###Arrange, Act, Assert Pattern

The Arrange Act Assert (AAA) pattern is a way to format your unit testing in a simple, easy-to-understand chunk of code. Each "A" represents a step in the testing process. Usually a blank line follows each step in the process.

Arrange all necessary preconditions and inputs
Act on the object or method you are testing
Assert the expected results have occurred

Example:
Testing #add on an instance of Calculator in our program:

@edhends
edhends / jquery_example.html
Last active August 29, 2015 13:56 — forked from dbc-challenges/jquery_example.html
Intro to jQuery for Phase 0
<!DOCTYPE html>
<html>
<head>
<title>DOM manipulation with jQuery</title>
<!-- Add a link to jQuery CDN here script here -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" src="jquery_example.js"></script>
</head>
@edhends
edhends / car_class.rb
Created January 26, 2014 05:27
Create a car class from user stories
# 1) Analyze the user stories
# You are tasked with creating a Car object that is to operate in the context of a pizza delivery video game. (Exciting!) Review the user stories below to get an idea of the class structure.
# As a video game player, I want to be able to create a new car and set it's model and color so I can customize it in the video game.
# As a video game player, I need to be able to define a distance to drive so I can follow directions appropriately.
# As a video game player, I'd like to be able to see the speed I am traveling, so I can properly accelerate or decelerate.
# As a video game player, I want to be able to turn left or right so I can navigate a city and follow directions.
# As a video game player, I want to be able to accelerate and decelerate the car to a defined speed so I can drive following the rules of the road.
# As a video game player, I want to keep track of the total distance I have travelled, so I can get paid for mileage.
@edhends
edhends / 0.2.1-boggle_class_from_methods.rb
Last active January 3, 2016 02:09 — forked from dbc-challenges/0.2.1-boggle_class_from_methods.rb
phase 0 unit 2 week 1 boggle class challenge
class GameBoard
def initialize(board)
@board = board
end
def create_word(*coords)
puts coords.map { |coord| @board[coord.first][coord.last]}.join("")
end
@edhends
edhends / 0.2.1-boggle_class_from_methods.rb
Created January 13, 2014 03:07 — forked from dbc-challenges/0.2.1-boggle_class_from_methods.rb
phase 0 unit 2 week 1 boggle class challenge
class BoggleBoard
#your code here
end
dice_grid = [["b", "r", "a", "e"],
["i", "o", "d", "t"],
["e", "c", "l", "r"],