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
begin | |
require "bundler/inline" | |
rescue LoadError => e | |
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler" | |
raise e | |
end | |
gemfile(true) do | |
source "https://rubygems.org" | |
# Activate the gem you are reporting the issue against. |
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
module ActiveRecordExtension | |
extend ActiveSupport::Concern | |
module ClassMethods | |
# Simple left join taking advantage of existing Rails & Arel code | |
def left_joins(*args) | |
inner_joins = self.unscoped.joins(*args).arel.join_sources | |
left_joins = inner_joins.map do |join| | |
Arel::Nodes::OuterJoin.new(join.left, join.right) | |
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
#!/usr/bin/env ruby | |
hits = [] | |
checks = { | |
#'_spec\.rb$' => ['focus:[:space:]*true'], | |
'\.rb$' => ['binding\.pry', 'debugger', 'byebug', 'console\.log'], | |
'\.erb$' => ['binding\.pry', 'debugger', 'byebug', 'console\.log'], | |
'\.js$' => ['binding\.pry', 'debugger', 'byebug', 'console\.log'], | |
'\.coffee$' => ['binding\.pry', 'debugger', 'byebug', 'console\.log'], |
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
{ | |
"ensure_newline_at_eof_on_save": true, | |
"tab_size": 2, | |
"translate_tabs_to_spaces": true, | |
"trim_trailing_white_space_on_save": true, | |
"rulers": | |
[ | |
80, | |
100, | |
140 |
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
// add layer | |
javascript:( | |
function() { | |
var div = document.createElement('div'); | |
var w = window.innerWidth; | |
var h = window.innerHeight; | |
div.setAttribute("class", "black-overlay"); | |
div.setAttribute("style", "position: fixed; top: 0px; left:0px; width: "+w+"px; height: "+h+"px; background-color: rgba(0,0,0,0.3); pointer-events: none; z-index: 4294967296"); | |
document.body.appendChild(div); | |
} |