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
module DefaultParamsHelpers | |
extend ActiveSupport::Concern | |
included do | |
let(:default_params) { {} } | |
alias_method_chain :process, :default_params | |
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
if defined? BetterErrors | |
require 'better_errors/repl/pry' | |
class BetterErrors::REPL::Pry::Output | |
def print(*args) | |
args.each { |arg| @buffer << arg.chomp } | |
end | |
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
#compdef rspec | |
# ------------------------------------------------------------------------------ | |
# Description | |
# ----------- | |
# | |
# Completion script for Ruby on Rails (http://rubyonrails.org/). | |
# | |
# ------------------------------------------------------------------------------ | |
# Authors | |
# ------- |
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
--color | |
--require spec_helper |
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
module HorizontalSplitNyan | |
def self.const_missing(const_name) | |
klass = Class.new(ActiveRecord::Base) | |
klass.table_name = "horizontal_split_nyans_#{const_name.to_s.downcase}" | |
const_set(const_name, klass) | |
end | |
def self.build(&block) | |
relations = table_classes.map { |c| c.instance_eval(&block) } | |
sql = relations.map { |r| r.to_sql }.join(' UNION ') |
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
醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴 | |
醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴響画醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴 | |
醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴夢愛画夢画糖醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴 | |
醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴夢夢夢夢糖夢糖買鬱醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴 | |
醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴躍夢夢夢夢夢夢夢夢画醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴 | |
醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴画夢夢夢糖画糖夢糖買躍醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴 | |
醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴画糖夢夢命土宙夢夢画糖醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴 | |
醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴躍買夢夢夢山勺画夢夢糖画醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴 | |
醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴襲愛夢糖夢愛命響夢夢糖鐘醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴 | |
醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴夢夢夢夢夢響糖夢夢糖鐘醴醴醴醴醴醴醴醴醴醴醴醴醴糖買鬱醴醴醴醴醴醴醴醴醴醴醴醴醴醴醴 |
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
# app/api/users.rb | |
class Users < Grape::API | |
format :json | |
get do | |
# returns users | |
end | |
get ':id' do | |
# returns user |
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
#compdef berks | |
# ------------------------------------------------------------------------------ | |
# Description | |
# ----------- | |
# | |
# Completion script for Berkshelf (http://berkshelf.com/). | |
# | |
# ------------------------------------------------------------------------------ | |
# Authors | |
# ------- |
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
module RSpec::Rails::Matchers | |
module RoutingMatchers | |
class RouteToMatcher | |
def description | |
method, path = @actual.first | |
expected = @expected.dup | |
to = "#{expected.delete(:controller)}##{expected.delete(:action)}" | |
str = "route #{method.upcase} \"#{path}\" to \"#{to}\"" | |
if expected.any? | |
str << " with parameter #{expected.inspect}" |
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
brew install autoconf | |
brew install automake | |
brew install libtool | |
brew install nasm | |
brew install apple-gcc42 | |
cd /usr/local/src/ | |
git clone [email protected]:mozilla/mozjpeg.git | |
cd mozjpeg/ | |
git checkout v1.0 |