Skip to content

Instantly share code, notes, and snippets.

View libbyschuknight's full-sized avatar
🏡
Working remotely

Libby Schumacher-Knight libbyschuknight

🏡
Working remotely
View GitHub Profile
{
"word_separators": "./\\()\"'-:,.;<>~@#$%^&*|+=[]{}`~"
}
@libbyschuknight
libbyschuknight / rake_task
Created October 4, 2015 20:58
Generate rake task
rails g task check_files check_dir import_file
change_column :products, :discount_percentage, :decimal, precision: 5, scale: 2
RACK_ENV=test bundle exec rake db:migrate
@libbyschuknight
libbyschuknight / rspec_ideas.rb
Last active December 21, 2015 20:25
rspec ideas / ways of doing
expect( this action ).to change( something ).by(1)
# trick
expect(response.body).to eql ""
### Use of 'anything' below
# old? - https://www.relishapp.com/rspec/rspec-mocks/v/2-7/docs/argument-matchers/general-matchers
# http://blog.endpoint.com/2014/09/rspecs-anything-argument-matcher.html
# http://www.rubydoc.info/gems/rspec-mocks/RSpec/Mocks/ArgumentMatchers
@libbyschuknight
libbyschuknight / trick_Create.rb
Created November 15, 2015 04:39
trick rails create
def create
fail
end
# will show
{"utf8"=>"✓",
"authenticity_token"=>"Kg0ES4VZZOeqhk+Axold+asCEkNKodWT+T77iIxRvKRdfYe0r9YBjbrcBgLuPyR74XBMLDa7Bc7IHcxcfkSogw==",
"article"=>{"title"=>"From page",
"body"=>"This is quite a cool css"},
@libbyschuknight
libbyschuknight / erb-helper-atom.txt
Created November 15, 2015 04:40
atom erb-helper
ERB Helper
Command Name ERB Value Key Binding
ERB Output <%= %> CTRL + SHIFT + .
ERB Eval <% %> CTRL + .
ERB Comment <%# %> CTRL + SHIFT + 3
sjdflksdf
;dflsf
if adslalhsdfds
tadslhfalshdflhdf
else
lkdsflshd
end
begin
raise BadRequest
rescue => error
p error.inspect
end