This file contains 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
# place the contents of this file in, e.g., spec/re_run_friendly_formatter.rb | |
# | |
# and in .rspec: | |
# | |
# --format ReRunFriendlyFormatter | |
require "rspec/core/formatters/progress_formatter" | |
class ReRunFriendlyFormatter < RSpec::Core::Formatters::ProgressFormatter | |
RSpec::Core::Formatters.register self, :dump_summary |
This file contains 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 GradePresenter | |
def initialize(grade) | |
@grade = grade | |
@@grade = grade | |
end | |
if @@grade.valid? | |
... | |
end | |
end |
This file contains 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
#Sort the Ruby files in your project by number of has_many | |
ack " has_many " -c | awk -F ":" '{print $2,$1}' | grep -v "0" | sort -rn |
This file contains 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
source 'https://rubygems.org' | |
ruby '2.1.5' | |
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
gem 'rails', '~> 4.1.7' | |
gem 'haml-rails' | |
gem 'jquery-rails' | |
gem 'opal-rails', '~> 0.7.0.beta2' | |
gem 'opal-vienna', '~> 0.7.0' |
This file contains 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
MyApp::Application.configure do | |
# Settings specified here will take precedence over those in config/application.rb. | |
# In the development environment your application's code is reloaded on | |
# every request. This slows down response time but is perfect for development | |
# since you don't have to restart the web server when you make code changes. | |
config.cache_classes = false | |
# Do not eager load code on boot. | |
config.eager_load = false |
This file contains 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
➜ ravioli git:(final-touch) ✗ rspec spec/features/navigation_spec.rb | |
/Users/cantonic/.rvm/gems/ruby-2.2.0@ravioli/gems/fog-core-1.24.0/lib/fog/core/collection.rb:148: warning: circular argument reference - filters | |
/Users/cantonic/.rvm/gems/ruby-2.2.0@ravioli/gems/fog-1.24.0/lib/fog/rackspace/mock_data.rb:42: warning: duplicated key at line 80 ignored: "name" | |
Setting up the application without customisations (NO presentation mode). | |
skipping fog configuration | |
/Users/cantonic/.rvm/gems/ruby-2.2.0@ravioli/gems/actionpack-4.1.9/lib/abstract_controller/helpers.rb:154:in `rescue in block in modules_for_helpers': Missing helper file helpers//users/cantonic/sites/ravioli/app/helpers/application_helper.rb_helper.rb (AbstractController::Helpers::MissingHelperError) | |
from /Users/cantonic/.rvm/gems/ruby-2.2.0@ravioli/gems/actionpack-4.1.9/lib/abstract_controller/helpers.rb:151:in `block in modules_for_helpers' | |
from /Users/cantonic/.rvm/gems/ruby-2.2.0@ravioli/gems/actionpack-4.1.9/lib/abstract_controller/helpers.rb:14 |
This file contains 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 | |
class AvatarUploader < CarrierWave::Uploader::Base | |
# Include RMagick or MiniMagick support: | |
# include CarrierWave::RMagick | |
include Cloudinary::CarrierWave | |
# Override the directory where uploaded files will be stored. | |
# This is a sensible default for uploaders that are meant to be mounted: |
This file contains 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
#!/usr/bin/ruby | |
# Create display override file to force Mac OS X to use RGB mode for Display | |
# see http://embdev.net/topic/284710 | |
require 'base64' | |
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |
This file contains 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
alert "yippie" |
OlderNewer