Skip to content

Instantly share code, notes, and snippets.

@MiriamNeubauer
MiriamNeubauer / halleluja
Created November 11, 2014 10:51
halleluja matthias
halleluja

Mini-app LAB requirements:

Must:

  • use CSS
  • use HTML
  • have at least 3 .html-pages: About, Contact, Resume
  • clickable links between the
  • 1 new styling element we have not used before (find by googling or "stalking" other sites)
  • reset default browser styling-settings
  • run on localhost (not live)
class BinTree
attr_accessor :left, :right, :val
def initialize(val)
@left = nil
@right = nil
@val = val
end
class TreeNode
attr_accessor :val, :left, :right
def initialize(v)
@val = v
end
def leaf?
# A node is a leaf if it has no children.
end
end
Magic 8-Ball Homework - Monday, Nov. 4th, 2013
This homework is a way to learn more about things we covered today in class. We talked about ActiveRecord relations and join tables. We also talked about CoffeeScript.
The objective for this assignment is to create a single page app that uses 3 models, Question, Answer, & AnsweredQuestion. There should be a has_many and has_many:through association between your models.
Use a seed file to put answers into your database. Please see seed file below, which has been typed out to spare you the pain of that :)
CoffeeScript will be used to implement the application's front-end logic and for making the AJAX post request.
Magic 8-Ball Homework - Monday, Nov. 4th, 2013
This homework is a way to learn more about things we covered today in class. We talked about ActiveRecord relations and join tables. We also talked about CoffeeScript.
The objective for this assignment is to create a single page app that uses 3 models, Question, Answer, & AnsweredQuestion. There should be a has_many and has_many:through association between your models.
Use a seed file to put answers into your database. Please see seed file below, which has been typed out to spare you the pain of that :)
CoffeeScript will be used to implement the application's front-end logic and for making the AJAX post request.

Coffee-Script lab

Hater's lab

Objective
To reinforce skills familiar in javascript regarding DOM interaction, and successfully translate them into Coffee-Script.
# ,o888888o. 8 8888 88 8 8888 8888888888',8888'
# . 8888 `88. 8 8888 88 8 8888 ,8',8888'
# ,8 8888 `8b 8 8888 88 8 8888 ,8',8888'
# 88 8888 `8b 8 8888 88 8 8888 ,8',8888'
# 88 8888 88 8 8888 88 8 8888 ,8',8888'
# 88 8888 `8. 88 8 8888 88 8 8888 ,8',8888'
# 88 8888 `8,8P 8 8888 88 8 8888 ,8',8888'
# `8 8888 ;8P ` 8888 ,8P 8 8888 ,8',8888'
# ` 8888 ,88'8. 8888 ,d8P 8 8888 ,8',8888'

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
class Person
attr_reader :name, :age
def initialize(name="no name", age)
@name = name
@age = age
end