Skip to content

Instantly share code, notes, and snippets.

View manlycode's full-sized avatar

Chris Rittersdorf manlycode

  • Collective Idea
  • Grand Rapids, MI
View GitHub Profile
Given /^yieldmanager data exists for company "([^\"]*)" from "([^\"]*)" to "([^\"]*)"$/ do |co_name, from, to|
user = UserSession.find
co = user.company
adv1 = Factory(:advertiser, :name => "adv1", :company => co)
line1 = Factory(:line, :name => "line1", :advertiser => adv1)
start_dt = Date.parse(from)
last_dt = Date.parse(to)
start_dt.upto(last_dt) do |dt|
// navigate to http://jquery.com
// pop open your JS console
var logo = $('#jq-siteLogo');
console.log(logo); //returns a jquery object
var logoDomElement = document.getElementById('jq-siteLogo')
console.log(logoDomElement); //returns a DOM element
- styled_form(:heading => heading, :other_classes => ['uncontained_form']) do
- form_for :creative, @creative, :url => advertiser_creatives_path(:advertiser_id => @advertiser.id), :html => {:method => :post, :multipart => true} do |f|
= render :partial => 'shared/form_error', :locals => {:models =>[@creative]}
.label_input.clearfix
= f.label(:name, "Name")
= f.text_field(:name)
.label_input.clearfix
= f.label(:clickthrough_url, "Clickthrough URL")
%div{:id => passed_in_id}
.label_input.long_submit
%label
 
= image_tag "form-spinner.gif", :class => "form_spinner", :style => 'display:none;'
.long_submit_button
= button_html
.cancel_button= link_to_back "Cancel"
.form_submitted_text{:style => "display:none;"} Submitting request to Yield Manager...
.clearfix
.label_input.long_submit
%label
 
= image_tag "form-spinner.gif", :class => "form_spinner", :style => 'display:none;'
.long_submit_button
= button_html
.cancel_button= link_to_back "Cancel"
.form_submitted_text{:style => "display:none;"} Submitting request to Yield Manager...
.clearfix
%div{:id => passed_in_id}
.label_input.long_submit
%label
 
= image_tag "form-spinner.gif", :class => "form_spinner", :style => 'display:none;'
.long_submit_button
= button_html
.cancel_button= link_to_back "Cancel"
.form_submitted_text{:style => "display:none;"} Submitting request to Yield Manager...
.clearfix
#webrat
within ("#selector") do |context|
context.should rspec_matcher("foo")
end
#capybara
with_scope("#selector") do
page.should rspec_matcher("foo")
end
class Something
def greeting
puts "Hi there"
end
end
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
<meta http-equiv="content-script-type" content="application/javascript" />
<meta http-equiv="content-style-type" content="text/css" />
<style>
body { font-family: monospace; }
</style>
<title>Vim Color Scheme Editor</title>
</head>
set shiftwidth=2 "number of spaces to use in each autoindent step
set tabstop=2 "two tab spaces
set softtabstop=2 "number of spaces to skip or insert when <BS>ing or <Tab>ing
set expandtab "spaces instead of tabs for better cross-editor compatibility
set autoindent "keep the indent when creating a new line
set smarttab "use shiftwidth and softtabstop to insert or delete (on <BS>) blanks
set cindent "recommended seting for automatic C-style indentation
set autoindent "automatic indentation in non-C files
set wrap "wrap entire words, don't break them; much easier to read!