-
$
rails new sample_app -T# -T ~ no Test::Unit -
#Update Gemfile (rspec, webrat)
-
$
bundle install -
$
rails g rspec:install -
git init; git add .; git commit -m ‘Initial commit’
This file contains hidden or 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
| import os | |
| import json | |
| import http.client as httplib | |
| import httplib2 | |
| import ssl | |
| from google.oauth2.credentials import Credentials | |
| from googleapiclient.discovery import build | |
| from googleapiclient.http import MediaFileUpload | |
| from googleapiclient.errors import HttpError | |
| import time |
This file contains hidden or 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
| Thank you for registering for CloudCamp San Francisco being held this evening Tuesday, June 24th at the 835 Market Street, Suite 700 (Microsoft San Francisco). We're looking forward to seeing you there, and we expect the event to be both stimulating and entertaining. We'll have plenty of food and drink on hand and CloudCamp t-shirts for the first 200 attendees. | |
| Below are all the details to help coordinate your attendance. | |
| DATE & TIME | |
| June 24th – 5:00 PM - 9:00 PM, Party to Follow | |
| LOCATION | |
| Microsoft San Francisco | |
| 835 Market Street, Suite 700 |
This file contains hidden or 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
| Post.find 2, (post) -> # Loads entity from /posts/2 | |
| post('title') # Returns 'Test post' | |
| post('title', 'New and better title!') # Sets new title value | |
| post('title') # Returns 'New and better title!' | |
| post.reload -> # Reloads fields from server | |
| post('title') # Returns 'Test post' | |
| post.delete -> console.log 'Deleted!' # Deletes fetched entity (DELETE /posts/2) |
This file contains hidden or 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
| # - Home page has a subscription form on it. | |
| # - Form is posted to create action of SubscribersController. | |
| # - When error occurs, controller renders home page | |
| # - URL in browser is http://app.example.com/subscribers | |
| # - I want it to be just http://app.example.com | |
| class SubscribersController < ApplicationController | |
| def create | |
| @subscriber = Subscriber.new(params[:subscriber]) |
This file contains hidden or 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
| import pprint | |
| pp = pprint.PrettyPrinter(indent=4) | |
| pp.pprint(object) |