When using custom properties in your stylesheets, you may want to set a specific property value to an existing variable...
It seems like changing the HTTP_ACCEPT_LANGUAGE is not possible for a headless chrome. On Ubuntu the headless Chrome...
Formerly 301 (Moved Permanently) and 302 (Found) were used for redirecting. Browsers did implement them in different ways, so since...
When using RestClient to make an HTTP request, it will raise an exception when receiving a non-successful response.
If you end up with an Elasticsearch cluster which has a very different disk usage on it's nodes you...
Accessing other repositories in Gitlab CI is not straight forward, since the access rights of the current pipeline might not...
In case your integration tests crash with a message like below, try to upgrade Capybara to a newer version (3.35.3...
The Node Version Manager allows installing multiple NodeJS versions and switching between them. By default, it does not automatically switch...
When giving a presentation where you do some coding, the font size you usually use is probably a bit too...
When testing JavaScript functionality in Selenium (E2E), you may need to access a class or function inside of a evaluate...
I encountered a unlucky behavior of byebug 11.1.3 (the most recent version at time of writing) when using it with...
rspec >= 3.1 brings a method and_wrap_original. It seems a bit complicated at first, but there are use cases...
To run additional code before an existing Rake tasks you can add a dependency like this: task :before_task...
Sometimes you want to load code on demand. For instance, when a a large library is only used on a...
This card is a general reminder to avoid the short version of a command option in shared code. It's...
When you need the DOM node of a tag (e.g. to read extra attributes, or to modify the DOM near it), you can usually reference it via document.currentScript. However, document.currentScript is unsupported in ancient browsers, like Internet Explorer 11 or wkhtmltopdf's Webkit engine. If you are not running async scripts, you can easily polyfill it: document.scripts[document.scripts.length - 1] It works because document.scripts grows with each tag that was evaluated. That is also the reason why this solution will not work reliably for async code. Demo: https://codepen.io/foobear/pen/poRLxQm
Ruby 3.0 introduced a breaking change in how it treats keyword arguments. There is an excellent blog post on the...
I really love to use the shortcuts CTRL+Alt+ Arrow Left and CTRL+Alt+ Arrow Right to navigate through the...
When you have a hex color code, you can easily convert it into its RGB values using plain Ruby.
We prefer to run our end-to-end tests with headless Chrome. While it's a very stable solution overall...
When your Rails application server raises error, Capybara will fail your test when it clears the session after the last...
When your application is open for public sign up and sends out transactional e-mails to a large number of...
In Ruby (almost) everything is an Object. While this enables a lot of powerful features, this concept might be confusing...
json is part of the standard library of Ruby and deals with JSON, obviously. As you know, JSON is the...