Let's say you have a gem which has the following module: module SuperClient def self.foo 'Foo' end
...the window's resize event, that might call your event listener many times. A better way is to subscribe to changes of the MediaQueryList object that is returned by matchMedia...
While debugging an intricate issue with failed HTTP requests I have come to appreciate the more advanced features of the...
Most of the time it is a tedious task to apply a code style guide to an existing code...
When building an application that sends e-mails to users, you want to avoid those e-mails from being classified...
Bundler allows you to specify the name of the Gemfile you want to bundle with the BUNDLE_GEMFILE environment variable...
bundle outdated [--filter-major|--filter-minor|--filter-patch] Example output for bundle outdated --filter-major Other examples
...as root for even more information and optionally also make use of stress for benchmarking, those methods did not provide any additional useful information for the current problem.
...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...
When changing code in mailers, updating the corresponding mailer preview can be forgotten very easily. Mailer previews can be tested...
...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...
...the file system. Since load order can be important, this may lead to different behavior on different machines which are hard to debug. Simply add a .sort: Dir.glob(Rails.root.join('lib/ext...
In RSpec you can tag examples or example groups with any tags you like simply by saying describe ReportCreator, slow...
Recently we detected a memory leak in one of our applications. Hunting it down, we found that the memory leak...
We had a card that described how to install multiple mysql versions using mysql-sandbox. Nowadays with the wide adoption...
...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.
It's possible to implement simple custom RuboCop cops with very little code. They work exactly the same like existing...
To keep JavaScript sources small, it can sometimes make sense to split your webpack bundles. For example, if your website...
...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...
New versions of wkhtmltopdf dissallow file:// URLs by default. You can allow them by passing --enable-local-file-access.
Within a Flexbox layout, there are multiple CSS attributes that may affect a child's basis (the initial width before...
tl;dr The strict-dynamic source list keyword allows you to simplify your CSP policy by favoring hashes and nonces...
...one to blame when the SEO folks complain about an empty . To avoid said behavior, use Nokogiri::XML instead of Nokogiri::HTML when parsing your HTML string. As long as...
...the input HTML contains a line break (somewhere inside the document, not at the beginning or end), the behavior of to_s magically changes to the above. >> Nokogiri::XML.fragment(" foo...
Running gem update --system will install the latest version of RubyGems. However the latest version might not be compatible with...