Permalink
Browse files

New home is vanity.labnotes.org

  • Loading branch information...
1 parent 00627a7 commit 977d458a4f0046d851e18a9ff7a19b92b36fb5c2 @assaf assaf committed Nov 18, 2009
Showing with 0 additions and 274 deletions.
  1. +0 −3 _config.yml
  2. +0 −19 _layouts/page.html
  3. +0 −47 css/page.css
  4. +0 −35 css/print.css
  5. +0 −7 css/syntax.css
  6. +0 −163 index.textile
View
3 _config.yml
@@ -1,3 +0,0 @@
-# http://wiki.github.com/mojombo/jekyll/configuration
-auto: true
-pygments: false
View
19 _layouts/page.html
@@ -1,19 +0,0 @@
-<html>
- <head>
- <meta content='text/html;charset=UTF-8' http-equiv='Content-Type'>
- <title>Vanity &mdash; {{ page.title }}</title>
- <style type='text/css'>@import 'css/page.css';</style>
- <style media='print' type='text/css'>@import 'css/print.css';</style>
- <link href='images/favicon.png' rel='shortcut icon'>
- </head>
- <body>
- <div id='header'>
- <a href='http://github.com/assaf/vanity/' title="Mirror, mirror, on the wall &hellip;" class="banner">Vanity</a>
- </div>
- <div id='content'>
- <h1 id='{{ page.title | downcase | replace(' ', '_') }}'>{{ page.title }}</h1>
- {{ content }}
- </div>
- <div id='footer'>Copyright &copy; 2009 Assaf Arkin</div>
- </body>
-</html>
View
47 css/page.css
@@ -1,47 +0,0 @@
-html { background-color: #fff; color: #111 }
-body {
- font-size: 12pt;
- font-family: "Helvetica Neue", "Helvetica", "DejaVu Sans", "Verdana", sans-serif;
- line-height: 1.4em;
- width: 40em;
- margin: 2em auto;
-}
-a:link, a:visited { color: #0044b3; text-decoration: none; }
-a:hover{ text-decoration: underline }
-img { border: none; }
-blockquote { padding-left: 2em; padding-right: 2em; margin-left: 0.3em; margin-right: 0; font-style: italic }
-ul { list-style-type: disc }
-ul ul { list-style-type: disc; padding-left: 1em }
-table { border-spacing: 0; width: 100%; margin: 0.3em 0 0.3em 0 }
-th, td { padding: 0.3em 0.5em 0.3em 0.5em; border-bottom: 1px solid #D8D8D8; vertical-align: top; background-color: #FFF }
-th, thead td { border-bottom: none; background-color: #669966; color: #fff; text-align: left }
-
-pre, code { font-family: "Menlo", "DejaVu Sans Mono", "Courier New", "Courier", monospace; font-size: 10pt; color: #222 }
-pre { margin: 0.6em 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap !important }
-pre br { display: none }
-
-h1, h2, h3 { line-height: 1.25em; letter-spacing: 0.03em; color: #87C72E }
-h1 { font-size: 2.2em; margin: 0 0 1em 0; border-bottom: 2px solid #ccc }
-h2 { font-size: 1.5em; margin: 2.5em 0 1em 0; border-bottom: 1px solid #ccc }
-h3 { font-size: 1.2em; margin: 1.5em 0 1em 0 }
-
-
-#header .banner {
- position: absolute; top: 1em; left: -2.4em; text-align: center; padding: .2em 0 .3em 0; width: 8em;
- background: #ff0000; border: 1px solid #fff0f0; color: #ff8; font-size: 18pt; font-weight: bold;
- -webkit-transform: rotate(-45deg); -moz-transform: rotate(-45deg);
- -webkit-box-shadow: 2px 2px 8px #ccc; -moz-box-shadow: 2px 2px 8px #ccc;
-}
-#header a:hover { color: blue; text-decoration: none }
-
-#content { }
-#content p.tip, #content p.note { margin: 0.9em 0 0 0; padding: 0 0 2em 4em }
-#content p.tip { background: url("../images/tip.png") 0 0 no-repeat; }
-#content p.note { background: url("../images/note.png") 0 0 no-repeat; }
-
-#footer {
- padding: 0;
- margin: 3em 0;
- border-top: 1px solid #ccc;
- text-align: right;
-}
View
35 css/print.css
@@ -1,35 +0,0 @@
-@media print {
- @page { size: letter; }
- @page:first {
- @top-left { content: normal }
- @top-right { content: normal }
- }
- @page:right {
- margin: 1.25in 1in 1.5in 1.5in;
- font: normal 10pt "Gill Sans" !important;
- @top-left { content: string(pagetitle); }
- @top-right { content: counter(page); }
- }
- @page:left {
- margin: 1.25in 1.5in 1.5in 1in;
- font: normal 10pt "Gill Sans" !important;
- @top-left { content: counter(page); }
- @top-right { content: string(pagetitle); }
- }
-
- title { string-set: doctitle content() }
-
- body { font-family: "Palatino"; margin: 0; color: black; background: white; font-size: 11pt }
-
- h1 { string-set: pagetitle content(); page-break-before: always }
- h1:first-child { page-break-before: avoid }
- h1, h2, h3 { font-family: "Gill Sans"; color: black }
- pre, p, blockquote { page-break-inside: avoid }
- pre, code { font-family: "Menlo", "DejaVu Sans Mono", "Courier New", "Courier"; font-size: 9pt }
- pre br { display: none }
- a:link, a:visited { background: transparent; text-decoration: none }
-
- #header, #pages, #footer { display: none }
- #content { color: black; width: auto !important; margin: 0; padding: 0; border: 0 }
-
-}
View
7 css/syntax.css
@@ -1,7 +0,0 @@
-.highlight .k, .highlight .kp { color: blue } /* keyword */
-.highlight .no { color: darkblue } /* constant */
-.highlight .s1 { color: green } /* string */
-.highlight .n { color: black } /* identifier */
-.highlight .o, .highlight .p { color: darkblue } /* = + */
-.highlight .ss { color: darkblue } /* symbol */
-.highlight .c1 { color: gray } /* comment */
View
163 index.textile
@@ -1,163 +0,0 @@
----
-layout: page
-title: Welcome to Vanity
----
-
-"Vanity":http://github.com/assaf/vanity is an Experiment Driven Development framework for Rails.
-
-!http://farm3.static.flickr.com/2540/4099665871_497f274f68_o.jpg!
-
-Requires Ruby 1.9.1 or later, Redis 1.0 or later.
-
-
-h2. A/B Testing with Rails (in 5 easy steps)
-
-1. Add Vanity to your Rails app:
-
-<pre>
-class ApplicationController < ActionController::Base
- use_vanity :current_user
-end
-</pre>
-
-2. Define an A/B test. This test compares three pricing options:
-
-<pre>
-experiment "Price options" do
- description "Mirror, mirror on the wall, who's the better price of them all?"
- alternatives 19, 25, 29
-end
-</pre>
-
-3. Present different options to the user:
-
-<pre>
-<h2>Get started for only $<%= ab_test :pricing_options %> a month!</h2>
-</pre>
-
-4. Measure conversion:
-
-<pre>
-class SignupController < ApplicationController
- def signup
- @account = Account.new(params[:account])
- if @account.save
- ab_goal! :pricing_options # <- conversion
- redirect_to @acccount
- else
- render action: :offer
- end
- end
-end
-</pre>
-
-5. Check the report:
-
-<pre>
-vanity --output vanity.html
-</pre>
-
-
-h2. A/B Tests
-
-Each A/B experiment represents several (two or more) alternatives. Use the ab_test method to choose an alternative. Call ab_test without a block to return the value of the chosen alternative. Call ab_test with a block to yield with the value.
-
-Here are some examples:
-
-<pre>
-def index
- if ab_test(:new_page) # classic false/true test
- render action: "new_page"
- else
- render action: "index"
- end
-end
-</pre>
-
-<pre>
-def index
- # alternatives are names of templates
- render template: ab_test(:new_page)
-end
-</pre>
-
-<pre>
-<%= if ab_test(:banner) %>100% less complexity!<% end %>
-</pre>
-
-<pre>
-<%= ab_test(:greeting) %> <%= current_user.name %>
-</pre>
-
-<pre>
-<% ab_test :features do |count| %>
- <%= count %> features to choose from!
-<% end %>
-</pre>
-
-To measure conversion, call ab_goal! with the experiment's name. Typically, you would do that from a controller action, for example:
-
-<pre>
-def create
- ab_goal! :new_page
- ...
-end
-</pre>
-
-To measure conversion, simply call ab_goal! with the experiment name. From the Vanity identity set by the filter we know which alternative was presented by ab_test, and can correlate conversions to alternative. It's that simple!
-
-
-h2. Managing Identity
-
-For effective A/B tests, you want to:
-- Randomly show different alternatives to different people
-- Consistently show the same alternatives to the same person
-- Know which alternative caused a conversion
-- When running multiple tests at once, keep them independent
-
-If you don't use any other mechanism, Vanity will assign a random value to a persistent cookie and use it to track the same visitor on subsequent visits. Cookie tracking is enabled by use_vanity.
-
-If you keep track of users, you would want to use the user's identity instead. Using user identity is more reliable than a cookie tied to a single Web browser.
-
-To do that, call use_vanity with the name of a method which returns an object with the desired id attribute. Alternatively, you can use a proc. These two examples are equivalent:
-
-<pre>
-use_vanity :current_user
-use_vanity { |controller| controller.current_user.id }
-</pre>
-
-There are times when you would want to use a different identity to distinguish test alternatives. For example, your application may have groups and you may want to A/B test an option that will be available (or not) to all people in the same group.
-
-You can tell Vanity to use a different identity on a particular controller using use_vanity. Alternatively, you can configure the experiment to extract the identity. The following example will apply to all controllers that have a project attribute (without affecting other experiments):
-
-<pre>
-example "New feature" do
- description "New feature only available to some groups"
- identify { |controller| controller.project.id }
-end
-</pre>
-
-
-h2. Configuring Vanity
-
-Vanity will work out of the box on a default configuration. Assuming you're using Redis on localhost, post 6379, there's nothing special to do.
-
-If you run a different setup, use the playground object to configure Vanity. For example:
-
-<pre>
-Vanity.playground.host = "redis.local"
-Vanity.playground.password = "supersecret"
-</pre>
-
-
-h2. Credits
-
-EDD was all "Nathaniel Talbott's":http://blog.talbott.ws/ idea, I had experiments to finish for "Apartly":http://apartly.com, there was coffee involved and out came the idea for Vanity.
-
-First experiment, A/B tests, heavily influenced by Patrick McKenzie's awesome "A/Bingo":http://www.bingocardcreator.com/abingo.
-
-Pain points courtesy of Google Analytics's stylish graphs and too-many-clicks goal tracking process.
-
-And let's not forget Steven Blank's "The Four Steps to the Epiphany":http://www.amazon.com/gp/product/0976470705?ie=UTF8&tag=labnotes-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=0976470705.
-
-Copyright (C) 2009 Assaf Arkin, released under the "MIT license":http://github.com/assaf/necktie/blob/master/MIT-LICENSE.

0 comments on commit 977d458

Please sign in to comment.