- Install Atom from https://atom.io/.
- Launch Atom and select
"Atom - Install Shell Commands"
menu to installatom
andapm
commands - Add
/usr/local/bin
toPATH
environment varibale
"Atom - Install Shell Commands"
menu to install atom
and apm
commands/usr/local/bin
to PATH
environment varibale“Content & Display Patterns,” an article by Dan Mall
body { | |
background-color: #fff; | |
&:after { | |
content: ''; | |
display: block; | |
background-image: linear-gradient(90deg, #a16eff 0%, #3dcebb 100%); | |
height: 4px; | |
position: absolute; | |
left: 0; | |
top: 0; |
scenario 'User likes the post' do | |
visit post_path | |
click_button 'Like' | |
expect { page.has_css?('.liked-icon') }.to become_true | |
end |
# You can preload associations explicitly. | |
# This method also can apply to polymorphic association. | |
# | |
# See also https://github.com/rails/rails/blob/master/activerecord/lib/active_record/associations/preloader.rb | |
# | |
def index | |
@comments = Comment.order(id: :desc).limit(10) | |
# This prevents N+1 query for user and commentable associations | |
ActiveRecord::Associations::Preloader.new.preload(@comments, [:user, :commentable]) |
Tool:
Environment:
/* Event Parameters | |
{ | |
"accessKeyId": "...", | |
"secretAccessKey": "...", | |
"region": "ap-northeast-1", | |
"instanceId": "i-XXXXXXXX" | |
} | |
*/ | |
exports.handler = function(event, context) { | |
console.log('instanceId =', event.instanceId); |
# Custom log formatter module for rails_12factor | |
# | |
module CustomLogFormatter | |
# Custom formatter for development environment. | |
# | |
# Examples | |
# | |
# # in controller | |
# logger.error(self.class) { 'This is a error message' } | |
# logger.info { 'This is a info message' } |