makandra dev

Sometimes you might need to nest a git-project inside another git-project. The right strategy is to use submodules...

We use the whenever gem to automatically update the crontab of the servers we deploy to. By default, whenever will...

around do |example| superuser_power = Power.new(create(:user, :superuser)) Power.with_power(superuser_power) do # before-block will be run here, DB snapshot will be created example.run # after-block will...

makandra dev

...Powerless but nothing was raised No power to ['creatable_cards'] The reason for this behavior is that the Capybara test server is running in another thread, and the RSpec thread...

makandra dev
iamvdo.me

...line-height is font-size relative, but the problem is that font-size: 100px behaves differently across font-families, so is line-height always the same or different? Is it...

In esbuild, you usually import other files using relative paths: import './some-related-module' import `../../utils/some-utility-module` import `../../../css/some-css.sass` This is totally fine...

Capybara has a variety of finder methods like find_button to help you look up DOM elements. There are also...

You can use git worktree to manage multiple working trees attached to the same repository. But why should I use...

...only because your step definition requires that. Here's a typical step definitions that benefits from using find_by_anything: When /^I sign in as "([^\"]+)")$/ do |identifier| user = User.find_by...

...the resulting record will not have the attributes that defined that scope, and this behavior can be quite useful. Because you cannot have the best from both worlds you should...

...article and make informed choices about how to define your conditions. Also see the Best Practice section below. The problem in detail Consider this Rails class and the following articles...

When storing floating-point numbers such as prices or totals in an SQL database, always use a DECIMAL column. Never...

We often have a separate production branch that lags a bit behind the more cutting edge main branch. Sometimes you want to move some, but not all commits from main...

makandra dev

Using git fixup helps you to speed up appending changes further back in the git history of your feature branch...

makandra dev
developers.google.com

Chrome has a built-in utility to check performance and accessibility (and more) of your web app: Lighthouse.

...e.g. wysiwyg text fields Consider to leave the paperclip columns (you can debug issues better) As many parts of file processing are not tested (resolution, fallback images and many more...

...exception notifier all failed jobs will trigger an email. Blocking the server: Mogrify (tool behind minimagic) sometimes freeze (for many thousand of jobs it will fail for sure). You need...

makandra dev
aaronlasseigne.com

All Rubyists should be familiar with the common definitions for include and extend. You include a module to add instance...

makandra dev

If you have a fully functional CI pipeline but no CD, you might find yourself frequently waiting for CI (with...

makandra dev

This card is mainly an explanation how variable fonts work in CSS, not necessarily a recommendation to actually use them...

...file. Note that this is # not guaranteed to be 100% accurate. It performs a "best guess" based # on a simple test of the first +File.blksize+ characters. # # Example: # # File.binary?('somefile.exe') # => true...

We use Sentry to be informed about different kinds of issues. One of the key features is that you are...

web.archive.org

...cat tmp/parallel_cucumber_failures.log | xargs geordi cucumber # Running features > Only: features/authentication.feature:33 features/backend/pages.feature:5 features/backend/pages.feature:60 ... Beside the linked article you might also be interested in reading An Opinionated Guide to xargs...

Rails offers the fresh_when method to automatically compute an ETag from the given record, array of records or scope...

Fill in find field with e.g. url (? .*?) Hint: the "url" at the beginning of the string is just a text fragment; the (? .*?) is our named capture group.

The sidekiq-rate-limiter gem allows rate-limiting Sidekiq jobs and works like a charm. However, it needs to be...