Skip to content

Instantly share code, notes, and snippets.

View WMahoney09's full-sized avatar

Will Mahoney WMahoney09

View GitHub Profile
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# split panes using | and -
bind | split-window -h -c '#{pane_current_path}'
bind - split-window -v -c '#{pane_current_path}'
unbind '"'
unbind %
@WMahoney09
WMahoney09 / term ouput
Created March 1, 2017 20:46
terminal output from windows 8.1 user, using official filesystem loader
➜ capybara-cucumber git:(AT-242) ✗ cucumber --tags @Test0049 ENV=qa BROWSER=chrome
BROWSER: chrome
ENVIRONMENT: qa
undefined method `client' for Percy:Module (NoMethodError)
/Users/gcejas/.gem/ruby/2.4.0/gems/percy-capybara-2.4.4/lib/percy/capybara/client.rb:27:in `initialize'
/Users/gcejas/.gem/ruby/2.4.0/gems/percy-capybara-2.4.4/lib/percy/capybara.rb:10:in `new'
/Users/gcejas/.gem/ruby/2.4.0/gems/percy-capybara-2.4.4/lib/percy/capybara.rb:10:in `capybara_client'
/Users/gcejas/.gem/ruby/2.4.0/gems/percy-capybara-2.4.4/lib/percy/capybara.rb:57:in `use_loader'
/Users/gcejas/Quietstream/automated_testing_framework/capybara-cucumber/features/support/percy.rb:40:in `<top (required)>'
/Users/gcejas/.gem/ruby/2.4.0/gems/cucumber-2.4.0/lib/cucumber/rb_support/rb_language.rb:96:in `load'
@WMahoney09
WMahoney09 / percy.rb
Created March 1, 2017 20:08
Custom Loader for Percy
require 'percy/capybara/loaders/sprockets_loader'
require 'digest'
require 'find'
class CustomLoader < Percy::Capybara::Loaders::SprocketsLoader
def build_resources
resources = []
# resource_url = "http://king.dev.imsdev.io/assets/css/app.min.css"
public_path = "#{Dir.pwd}/features/root"
@WMahoney09
WMahoney09 / digest_helper.rb
Last active February 13, 2017 18:01
handle ASYNC calls to API and subsequent Angular Digest cycle
def page_ready
if (execute_script("return document.readyState") != 'complete') || (execute_script("return window.jQuery.active") != 0)
return false # Not Ready: Document not loaded or active jQuery on page
end
phase = execute_script("return window.angular.element(document.body).injector().get('$rootScope').$$phase")
pending = execute_script("return window.angular.element(document.body).injector().get('$http').pendingRequests.length")
if (phase === '$apply' || phase === '$digest' || pending != 0)
return false # Not Ready: Angular digesting or loading data
end
@WMahoney09
WMahoney09 / client_issue.sh
Created February 2, 2017 16:11
Undefined method `client` for Percy:Module (NoMethodError)
9008 ENV=dev
BROWSER: firefox
ENVIRONMENT: dev
undefined method `client' for Percy:Module (NoMethodError)
/Users/msergeant/.rvm/gems/ruby-2.3.0@capybara_testing/gems/percy-capybara-2.3.5/lib/percy/capybara/client.rb:25:in `initialize'
/Users/msergeant/.rvm/gems/ruby-2.3.0@capybara_testing/gems/percy-capybara-2.3.5/lib/percy/capybara.rb:10:in `new'
/Users/msergeant/.rvm/gems/ruby-2.3.0@capybara_testing/gems/percy-capybara-2.3.5/lib/percy/capybara.rb:10:in `capybara_client'
/Users/msergeant/.rvm/gems/ruby-2.3.0@capybara_testing/gems/percy-capybara-2.3.5/lib/percy/capybara.rb:57:in `use_loader'
/apps/automated_testing_framework/capybara-cucumber/features/support/percy.rb:33:in `<top (required)>'
@WMahoney09
WMahoney09 / .vimrc
Last active April 13, 2019 12:54
vimrc
# .vimrc og
autocmd vimenter * NERDTree
nnoremap <C-e> :NERDTreeToggle<CR>
syntax on
set ru
set number
set shiftwidth=2
let g:ctrlp_map='<c-p>'
let g:ctrlp_cmd='CtrlP'