Within a Flexbox layout, there are multiple CSS attributes that may affect a child's basis (the initial width before...
I recently built a screen with a very high and wide table in the center. This posed some challenges:
This card describes different flavors for concatting HTML safe strings in a helper method in Rails. You might want to...
In general, you should not put a block element inside an inline element. So don't do this: text
PostgreSQL offers a really handy field type: json. You can store any JSON there, in any structure. While its flexibility...
You can use local copies of gems in your Gemfile like this: gem 'spreewald', path: '~/gems/spreewald' As soon as you...
Timecop is a great gem to set the current time in tests. However, it is easy to introduce flakyness to...
Most of our applications use CarrierWave for file uploads. CarrierWave has an integrated processing mechanism for different file versions with...
Sometimes it is useful to define a named scope by implementing a static method with the scope's name on...
When building an application that sends e-mails to users, you want to avoid those e-mails from being classified...
Most of the time it is a tedious task to apply a code style guide to an existing code...
When using Rails credentials, you will edit the encrypted credentials for staging or production environments from time to time. To...
bundle outdated [--filter-major|--filter-minor|--filter-patch] Example output for bundle outdated --filter-major Other examples
When you are using lambdas in RSpec to assert certain changes of a call, you know this syntax: expect { playlist.destroy...
...write <<EOT. If you do this, your terminating sequence must be at the very beginning of the line. It's less pretty and there is rarely a reason to use...
...send a merge request, please confirm that your code ... has been reviewed by yourself beforehand fulfills every requirement defined as an acceptance criterion does not have any log or debugging...
Sometimes we have to write code that behaves differently based on the version of a specific gem or the Ruby Version itself. The version comparison can often be seen with...
Also see the list of IRB commands. Switching the context Changes the "default receiver" of expressions. Can be used to...
The linked MDN article is quite informative of a neat feature supported by all major browsers: Unicode character class escape...
Running gem update --system will install the latest version of RubyGems. However the latest version might not be compatible with...
...it and just builds a framework for concrete implementations. This is were another gem becomes important: database_cleaner-active_record. It provides the default ActiveRecord cleaner instance and is also...
...second database just once by using DatabaseCleaner[:active_record, db: MigrationRecord], but it's better readable and more convenient in case you want to change a strategy in the future...
To keep JavaScript sources small, it can sometimes make sense to split your webpack bundles. For example, if your website...
...as the developer of the website) to do it properly, but wants to have better proof. To this end, the advertising network (e.g. "Google Advertising Products") will register with the...
"vendor X is allowed to serve personalized advertising based on user behavior", or "vendor X is allowed to use user data to improve its algorithm" etc.
...PNG with a decent resolution (72 dpi). However, in my experience the result is better, if you set the density to a higher value and then resize to the desired...
...size. But you can just toy with those values and see what works best for you. convert -density 1200 -resize 96x96 input.svg output.png Transparency By default, your target image is...