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
file 'Gemfile', <<-GEMS | |
source 'http://gemcutter.org' | |
gem "rails", "3.0.0.rc2" | |
gem "bson_ext", '1.0.4' | |
gem "mongoid", "2.0.0.beta.17" | |
gem "compass", "0.10.5" | |
group :development, :test do | |
gem "rspec-rails", "2.0.0.beta.20" | |
gem "capybara" |
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
Installing migration_assist (0.1.9) /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/specification.rb:1050:in `ruby_code': ruby_code case not handled: Syck::PrivateType (Gem::Exception) |
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 Bastard | |
def punch | |
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
- domain = @config[:ganalytics][:domain] | |
- site_id = @config[:ganalytics][:site_id] | |
- if site_id | |
:javascript | |
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); | |
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); | |
:javascript | |
try { | |
var pageTracker = _gat._getTracker("#{site_id}"); | |
pageTracker._setDomainName(".#{domain}"); |
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 'active_support/basic_object' | |
ActiveRecord::Base.class_eval do | |
class WithoutCallbacks < ActiveSupport::BasicObject | |
def initialize(target, types) | |
@target = target | |
@types = types | |
end | |
def respond_to?(method, include_private = false) |
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
SimpleForm.setup do |config| | |
# Wrappers are used by the form builder to generate a complete input. | |
# You can remove any component from the wrapper, change the order or even | |
# add your own to the stack. The options given to the wrappers method | |
# are used to wrap the whole input (if any exists). | |
config.wrappers :bootstrap, :tag => 'fieldset', :class => 'control-group', :error_class => 'error' do |b| | |
b.use :placeholder | |
b.use :label, :class => 'control-label' | |
b.use :tag => 'div', :class => 'controls' do |ba| | |
ba.use :input |
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
usage 'create:post [options]' | |
aliases :cp | |
summary 'create a new blog post' | |
description '' | |
flag :h, :help, 'show help for this command' do |value, cmd| | |
puts cmd.help | |
exit 0 | |
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
upstream example-workers { | |
# fail_timeout=0 means we always retry an upstream even if it failed | |
# to return a good HTTP response (in case the Unicorn master nukes a single worker for timing out). | |
server unix:/tmp/example.co.uk.socket fail_timeout=0; | |
} | |
server { | |
listen 80; # default; | |
server_name example.co.uk; | |
root /home/example.co.uk/website/public; |
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
=semantic_form_for [:admin, @dog], validate: true, html: {multipart: true} do |f| | |
=f.inputs do | |
=f.input :name | |
=f.input :kennel_name | |
=f.input :birthdate | |
=f.input :gender, as: :radio, collection: {'Tik' => 'F', 'Hane' => 'M'} | |
=f.input :father_id, as: :select, collection: @dogs | |
=f.input :mother_id, as: :select, collection: @bitches | |
=f.semantic_fields_for :pictures do |pic| |
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
upstream unicorn { | |
server unix:/tmp/unicorn.app_name.sock fail_timeout=0; | |
} | |
server { | |
listen 80 default deferred; | |
server_name apps.company.com/app_name/; | |
root /home/deployer/apps/app_name/current/public; | |
location ^~ /assets/ { |
OlderNewer