Skip to content

Instantly share code, notes, and snippets.

@erikolsen
erikolsen / jquery_example.html
Last active August 29, 2015 13:57 — 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>
<body>
@erikolsen
erikolsen / jquery_example.html
Created March 15, 2014 18:31 — 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 type="text/javascript" src="jquery_example.js"></script>
</head>
<body>
@erikolsen
erikolsen / GroceryList.rb
Created February 12, 2014 22:08
Basic Grocery List
class GroceryList
attr_accessor :list
def initialize
@list = []
@original_list = []
end
def add_item(item_object, qty = 1)
item_object.qty += qty
@erikolsen
erikolsen / 0.2.1-boggle_class_from_methods.rb
Last active August 29, 2015 13:55 — forked from dbc-challenges/0.2.1-boggle_class_from_methods.rb
phase 0 unit 2 week 1boggle class challenge
#[0,0], [1,1], [2,2], [3,3] == true [0,0], [3,3]
#[0,3], [1,2], [2,1], [3,0] ==true
#[0,1], [1,2], [2,3] == true
# Roughly 12029640 possible boggle words in a 4x4 board
class BoggleBoard
def initialize(new_board)
@board = self.random_board(4) if new_board == nil
@board = new_board if new_board != nil
@max_value = @board.length