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
| ln -s source_file myfile |
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
| " maps substitute command to sub out the current word for quick refactorings | |
| nmap <leader>re :%s/<c-r>=expand("<cword>")<cr>/ |
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
| # grep all files in this directory (and subdirectories) that end in .rb and contain 'guests = self.guests' | |
| grep -r 'guests = self.guests' . --include \*.rb |
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
| ctags -R --languages=ruby --exclude=.git --exclude=log . $(bundle list --paths) |
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
| kill $(cat tmp/pids/server.pid) |
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
| ps xa | grep postgres: | grep "backupify_development" | grep -v grep | awk '{print $1}' | xargs kill |
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
| # A generic error that implementations can use to wrap their exceptions with | |
| class BaseWrapperException < StandardError | |
| def initialize(e = nil) | |
| super e | |
| return self unless e.present? && e.is_a?(Exception) | |
| # Preserve the original exception's data | |
| set_backtrace e.backtrace | |
| message.prepend "#{e.class}: " | |
| 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
| # Inherits everything else from defaul Rubocop config | |
| Metrics/LineLength: | |
| Max: 100 | |
| Style/SpaceBeforeBlockBraces: | |
| Enabled: false | |
| Style/SpaceInsideBlockBraces: | |
| Enabled: 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
| # require 'guard/plugin' | |
| # | |
| # module ::Guard | |
| # class BackupifyTest < ::Guard::Plugin | |
| # def run_all | |
| # end | |
| # | |
| # def run_on_changes(paths) | |
| # paths.each do |path| | |
| # raise :task_has_failed unless system "ruby -Itest #{path}" |
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
| setup do | |
| # Setup a route for our fake controller | |
| Rails.application.routes.draw do | |
| get "/readonlymodetest/foo" => "DOMAIN/read_only_mode_test#foo" | |
| get "/readonlymodetest/foo_with_write" => "DOMAIN/read_only_mode_test#foo_with_write" | |
| root :to => 'pages#show', :id => 'home' | |
| end | |
| end |