Skip to content

Instantly share code, notes, and snippets.

@tlowrimore
tlowrimore / set_operations.rb
Created March 10, 2016 17:41
Extends the functionality set forth in union_scope.rb, to include EXCEPT and INTERSECT operations
module ActiveRecord
module Scopes
module SetOperations
extend ActiveSupport::Concern
class_methods do
def union_scope(*scopes)
apply_operation 'UNION', scopes
end
@b-b3rn4rd
b-b3rn4rd / example.git
Last active May 29, 2023 09:20
Moving pushed commit from one branch to another
// moving 71b8026 from features/project-part-2 to features/project-part-1
git checkout features/project-part-2
git revert 71b8026
// for sanity check can run git diff to between branched for particular file(s)
git difftool features/project-part-2..features/project-part-1 -- ./website/app/controllers/ExampleController.php
git push origin features/project-part-2
git checkout features/project-part-1
git cherry-pick 71b8026