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
| compat.version=1.9 | |
| cext.enabled=true | |
| errno.backtrace=true | |
| Xcext.enabled=true |
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 mysite { | |
| server unix:/etc/unicorn/sockets/mysite.socket fail_timeout=0; | |
| } | |
| server { | |
| client_max_body_size 2M; | |
| keepalive_timeout 5; | |
| listen 80; | |
| server_name localhost; |
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
| group :development, :test do | |
| gem 'sqlite3' | |
| gem 'trinidad', :platform => :jruby | |
| gem 'unicorn', :platform => :ruby | |
| gem 'better_errors' | |
| gem 'binding_of_caller' | |
| gem 'awesome_print' | |
| gem 'rake' | |
| gem 'pry', :require => false | |
| gem 'chef' |
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 'capistrano_colors' | |
| require 'capistrano/maintenance' | |
| require 'capistrano/ext/multistage' | |
| require 'colored' | |
| require 'ruby_cowsay' | |
| require 'manic_monkey' | |
| # change this to ::INFO if you need more... umm... info | |
| # change this to ::IMPORTANT for normal deploys | |
| logger.level = Logger::IMPORTANT |
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
| # elevate to root and save file | |
| # http://unix.stackexchange.com/a/11006/31042 | |
| :w !sudo dd of=% |
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 DateTimePickerInput < SimpleForm::Inputs::Base | |
| def input | |
| template.content_tag(:div, class: 'input-group date form_datetime') do | |
| template.concat @builder.text_field(attribute_name, input_html_options) | |
| template.concat span_remove | |
| template.concat span_table | |
| end | |
| end | |
| private |
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
| $ irb | |
| # sample array of slots | |
| rbx-2.2.5 :001 > a = %w[slot1 slot3] | |
| => ["slot1", "slot3"] | |
| # require our class, in this case called section | |
| rbx-2.2.5 :002 > require './lib/section.rb' | |
| => true |
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
| # encoding: UTF-8 | |
| # This file is auto-generated from the current state of the database. Instead | |
| # of editing this file, please use the migrations feature of Active Record to | |
| # incrementally modify your database, and then regenerate this schema definition. | |
| # | |
| # Note that this schema.rb definition is the authoritative source for your | |
| # database schema. If you need to create the application database on another | |
| # system, you should be using db:schema:load, not running all the migrations | |
| # from scratch. The latter is a flawed and unsustainable approach (the more migrations | |
| # you'll amass, the slower it'll run and the greater likelihood for issues). |