Skip to content

Instantly share code, notes, and snippets.

http://xfinity.comcast.net/blogs/tv/files/2010/10/carrie-ann-inaba.jpg
http://en.wikipedia.org/wiki/File:Matthew_Broderick_portrait_2009.jpg
http://img.ehowcdn.com/article-new/ehow/images/a05/pa/c6/ten-kid-should-cell-phone-1.1-800x800.jpg
class DesignsController < ApplicationController
respond_to :json, :only => :create
respond_to :html, :json, :only => [:index, :unpublished]
end
Then /^I should see ([^"]+)$/ do |thing|
page.should have_css(selector_for(thing))
end
When /^(.*) within ([^:"]+)$/ do |step, parent|
with_scope(parent) { When step }
end
<?xml version="1.0" encoding="UTF-8"?><add><doc><field name="type">Design</field><field name="type">ActiveRecord::Base</field><field name="id">Design 6</field><field name="class_name">Design</field><field name="state_text">published</field><field name="category_name_text">Aric Smith</field><field name="tag_list_text">hippies</field><field name="tag_list_text">anti-capitalist</field><field name="tag_list_text">wealthy</field><field name="name_text">Brighton</field></doc></add>
<?xml version="1.0" encoding="UTF-8"?><commit/>
<?xml version="1.0" encoding="UTF-8"?><add><doc><field name="type">Design</field><field name="type">ActiveRecord::Base</field><field name="id">Design 5</field><field name="class_name">Design</field><field name="state_text">published</field><field name="category_name_text">Aric Smith</field><field name="tag_list_text">hippies</field><field name="tag_list_text">anti-capitalist</field><field name="tag_list_text">wealthy</field><field name="name_text">Brighton</field></doc></add>
en:
activerecord:
errors:
full_messages:
format: "%{attribute} %{message}"
class CalendarMonth
extend ActiveModel::Naming
attr_accessor :start_time, :end_time
FORMAT = '%Y-%m'
def initialize(date_string = nil)
if date_string.blank?
now = Time.now
var stubChainedMethods = function (obj, methods) {
if (methods.length === 0) {
return null;
} else {
obj[methods[0]] = function () {
return obj;
};
return stubChainedMethods(obj, methods.slice(1, methods.length));
}
#!/bin/bash
exec svlogd -tt ./main
#!/usr/bin/env ruby
require 'rubygems'
require 'right_aws'
require 'ruby-debug'
site = ARGV[0]
chef_32bit = 'ami-e0635694'