Skip to content

Instantly share code, notes, and snippets.

const http = require('http')
const port = 8000
const requestHandler = (request, response) => {
console.log(request.url)
response.statusCode = 200;
response.setHeader('Content-Type', 'text/plain');
response.end("Hello, HTTP! \n")
}

#Angular Curriculum

Unit 1:

  • Intro and Setup
  • 2 Way Data Binding
  • Expressions and Filters
  • Intro to Controllers
  • Built-In Directives
  • Angular Events

#Angular 1 - Basics

##Setup

  • Create an index.html file
  • Add ng-app

##2 Way Data Binding

Let's start with something simple that showcases the power of Angular. In index.html create a text input.

@Colt
Colt / responsive-design-workshop.md
Created March 25, 2015 22:37
Informal Responsive Design Workshop
@Colt
Colt / authorFixtures.js
Created February 12, 2015 18:12
Ember Book Shop Exercise
App.Author.FIXTURES = [
{
id: 1,
name: "J.K Rowling",
image: "http://ecx.images-amazon.com/images/I/31zc-85LuML._UX250_.jpg",
bio: 'J K (Joanne Kathleen) Rowling was born in the summer of 1965 at Yate General Hospital in England and grew up in Chepstow, Gwent where she went to Wyedean Comprehensive. Jo left Chepstow for Exeter University, where she earned a French and Classics degree, and where her course included one year in Paris. As a postgraduate she moved to London to work at Amnesty International, doing research into human rights abuses in Francophone Africa. She started writing the Harry Potter series during a Manchester to London Kings Cross train journey, and during the next five years, outlined the plots for each book and began writing the first novel. Jo then moved to northern Portugal, where she taught English as a foreign language. She married in October 1992 and gave birth to her daughter Jessica in 1993. When her marriage ended, she returned to the UK to live in Edinburgh, whe

#Project Presentations Order

  • Kevin Litchfield
  • Erika Lim
  • Zubair Desai
  • Nina Bachvarova
  • Julien Mayer
  • Denise Shephard
  • Oscar Linares
  • Max Gordon
require 'nokogiri'
require 'rest-client'
class Review
attr_reader :raw, :date, :stars, :user, :body
def initialize(html='')
@raw = html
@noko = Nokogiri::HTML(html)
@date = extract_meta('datePublished')

Scrape this site and use it's data to answer the following questions:

  1. Create a record for each snack containing the following:
    • Name
    • Number of snack
    • Flavor
    • Cuisine
    • Series
    • Composition (reference these to the appropriate documents in mongo)
  • Date it became an official snack
require 'nokogiri'
class Review
attr_reader :raw, :date, :stars, :user, :body
def initialize(html='')
@data = html
@date = extract_meta('datePublished')
@stars = extract_meta('ratingValue')
@user = extract_user
# Simple Singly Linked List Implementation in Ruby
class Node
attr_accessor :value, :next_node
def initialize(value)
@value = value
end
end
class LinkedList
def initialize(value)