Skip to content

Instantly share code, notes, and snippets.

View ScottRadcliff's full-sized avatar
💭
Is this necessary?

Scott Radcliff ScottRadcliff

💭
Is this necessary?
View GitHub Profile
// Grabs the size selected and adds it to the total
$("select[name = 'sizes[]']").click(function(){
var sizes = $("select[name = 'sizes[]']");
var counter = 0;
for (var i=0; i < sizes.length; i++) {
counter = Number(counter) + Number(sizes[i].value);
};
sub_total = counter;
@ScottRadcliff
ScottRadcliff / gist:1100798
Created July 23, 2011 01:03
Test that the title is titleized
Scenario: Create a post with a lower case title
Given I am logged in
And I visit the new posts page
And I fill in "Title" with "I love coffeescript"
And I fill in "Content" with "Super cool"
And I press "Post"
Then the title should be "I Love Coffeescript"
# post_steps.rb
@ScottRadcliff
ScottRadcliff / zshrc
Created October 28, 2011 22:04
zshrc
autoload -U promptinit
promptinit
autoload -U compinit promptinit
compinit
promptinit
setopt prompt_subst
autoload -U colors && colors
promptinit
<% if Rails.env.development? %>
<div class="development-mode">Hacking in Development Mode</div>
<% end -%>
.development-mode {
width: 100%;
background: red;
color: white;
text-align: center;
font: 14px Helvetica;
padding: 8px 0;
}
@ScottRadcliff
ScottRadcliff / gist:2570136
Created May 1, 2012 18:07
Subdomain enabled cookies with IE
SomeApp::Application.config.session_store :cookie_store, key: 'SomeAppSession', domain: ".someapp.com"
@ScottRadcliff
ScottRadcliff / gist:2790520
Created May 25, 2012 21:01
Presenter Test
require 'date'
require 'awesome_print'
require File.expand_path(__FILE__ + "/../../../app/presenters/job_presenter")
class Job
attr_accessor :due_by
def initialize(due_by)
@due_by = due_by
end
end
@ScottRadcliff
ScottRadcliff / .recipe
Created October 17, 2012 20:35 — forked from sowawa/.recipe
Installing rails 4.0.0 beta
thumbnail: http://pds.exblog.jp/pds/1/201101/16/02/d0055302_13383029.jpg
video: http://www.youtube.com/watch?v=UE27t_LJpx0
@ScottRadcliff
ScottRadcliff / gemrc
Created October 30, 2012 18:29
gemrc
:benchmark: false
:verbose: true
gem: --no-ri --no-rdoc
@ScottRadcliff
ScottRadcliff / rails_config
Created August 29, 2013 20:07
Rails Production Server Configuration
export RAILS_ENV=production
export BUNDLE_WITHOUT="test:development"