hello world!
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
| A traditional request handling model works like this: | |
| 1. Browser makes a connection (think of it as dialing a restaurant) | |
| 1. Server accepts the connection (restaurant employee answers phone) | |
| 1. Browser sends a request (think of this as saying "I'd like to make a dinner reservation") | |
| 1. Server processes the request and sends the response ("Got it, your reservation is made") | |
| 1. The connection is closed (both sides hang up) | |
| This is great, except that each employee is expensive, and the restaurant can only afford to pay N employees. If there are more people calling in a given moment than their are employees to respond to a call, callers will get frustrated that nobody has picked up, hang up, and try again later (or try another restaurant). |
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
| .my_highlight { | |
| text-decoration:underline; | |
| background-color:orange; | |
| } |
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
| {} |
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
| [] |
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
| { | |
| client_id: $client_id, | |
| cohort_type: $cohort_type, // Sign up date, first purchase date | |
| cohort_bin_width: $cohort_bin_width, // Week, month, quarter, year | |
| cohort_value: $cohort_value, // 20120407, 201204, 2012.1, 2012 | |
| // Further segmentation? | |
| // engagement | |
| // location |
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
| class GreaterThan | |
| def display | |
| "more than" | |
| end | |
| def evaluate one, two | |
| one > two | |
| end | |
| end |
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
| class TotalPriceGreaterThan | |
| def display | |
| "Customer spent more than #{threshold}" | |
| end | |
| def evaluate | |
| receipt().total_price() > threshold() | |
| end | |
| def purchase |
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
| set autoindent | |
| set autoread | |
| set backspace=eol,start,indent | |
| set expandtab | |
| set history=700 | |
| set nobackup | |
| set nowb | |
| set noswapfile | |
| set ruler | |
| set smartindent |
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
| require "spec_helper" | |
| describe "An RSpec example using nested before(:all) blocks" do | |
| before(:all) do | |
| puts "This is called at the beginning of the example" | |
| end | |
| it "Tests something" do | |
| false.should eq(false) | |
| end |