- If you're not in a well-stocked kitchen, abort, abort.
- "Retrieve" (look for and pick up in your hands) a "toaster" (a box with slots on top and a "cord" (pronged tail)); we will use this to heat food items in the future, making them more edible
- Place it on your "workspace" (a clear flat surface)
- Retrieve a "knife" (a hard, sharp tool); look for "handles" (hand-sized loops attached to sliding bins) and open them until you find a knife, then set it down on your workspace
- Look along the walls for "electrical sockets" (two slots for the toaster's cord prongs to go into)
- If the toaster is near enough to the electrical sockets, insert the cord's prongs into an electrical socket
- If not, pick it up and move it closer, then try again
- Retrieve a "loaf of bread" (a soft squareish cylinder in a transparent, flimsy bag). There may be more than one bagged item, so use your hands to feel for softness and shape (there's no danger or risk) and choose the one that best matches these critera
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
$( '.pin-tag').html(function( index, oldHtml ) { | |
if(this.outerHTML == '<a class="pin-tag" href="http://pinboard.in/u:maxjacobson/t:max_jacobson">max_jacobson</a>') { | |
return '<a class="pin-tag extra-hot" href="http://pinboard.in/u:maxjacobson/t:max_jacobson"><strong>max_jacobson</strong></a>' | |
} | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###### some methods ####### | |
def print_board | |
puts | |
for i in 0..8 | |
if @the_board[i].nil? | |
print "#{i+1}" | |
else | |
print "#{@the_board[i]}" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def is_palindrome? whatsit | |
str = whatsit.to_s.downcase.gsub(/ |[^\w\d]|\n/, '') | |
str == str.reverse ? true : false | |
end | |
to_check = [ | |
"a man, a plan, a canal: panama", | |
"Mr. Owl Ate My Metal Worm", | |
909, | |
100, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class String | |
def word_count | |
self.split(" ").length | |
end | |
def char_count | |
self.chars.to_a.length | |
end | |
def contains(word) | |
self.gsub(/[^\w]/, " ").split(" ").count(word) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Node | |
attr_accessor :name, :children | |
def initialize (name) | |
@name = name | |
@children = Hash.new | |
end | |
def add_children(*names) | |
names.each do |name| | |
@children[name] = Node.new(name) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
layout: default | |
title: Your New Jekyll Site | |
--- | |
<div id="home"> | |
<h1>Blog Posts</h1> | |
<ul class="posts"> | |
{% for post in site.posts %} | |
<li><span>{{ post.date | date_to_string }}</span> » <a href="{{ post.url }}">{{ post.title }}</a></li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
layout: default | |
title: Your New Jekyll Site | |
--- | |
<div id="home"> | |
<h1>Blog Posts</h1> | |
<ul class="posts"> | |
{% for post in site.posts %} | |
<li><span>{{ post.date | date_to_string }}</span> » <a href="{{ post.url }}">{{ post.title }}</a></li> |
- GitHub - http://github.com/maxjacobson
- Blog - http://maxjacobson.github.io
- Tagline: Just some guy, likes making things
- Profile Picture - http://d.pr/i/l0iJ
- Treehouse - http://teamtreehouse.com/maxjacobson
- CoderWall - https://coderwall.com/maxjacobson
- CodeSchool Username - maxjacobson
- Favorite Websites
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- run while testing: | |
-- sqlite3 -echo amazon.db < amazon.sql | |
DROP TABLE dvd; | |
DROP TABLE review; | |
-- 1) Create a database with tables and columns that | |
-- will hold information about DVD's | |
-- for sale on Amazon | |
CREATE TABLE dvd ( |
OlderNewer