Headless Chrome is a way to run the Chrome browser without a visible window. Configuring Capybara Configure the Capybara driver...
IRB 1.2 (shipped with Ruby 2.7, but works on 2.5+) brings pretty syntax highlighting and multiline cursor navigation. However, pasting...
This card is mainly an explanation how variable fonts work in CSS, not necessarily a recommendation to actually use them...
Git diffs show the surrounding contexts for diff hunks. It does so by applying regular expressions to find the beginning...
Minidusen lets you find text in associated records. Assume the following model where a Contact record may be associated with...
When loading a database dump created with pg_dump into your database, you might run into an error like
It sometimes happen that a database dump, that would want to insert into your development database, does not match the...
There is a common view that extracting text from a PDF document should not be too difficult. After all, the...
The sidekiq-rate-limiter gem allows rate-limiting Sidekiq jobs and works like a charm. However, it needs to be...
When logging in Rails, you can use the log_tags configuration option to add extra information to each line, like...
To find a version containing the regular expression foo in the history of any branch: git grep foo $(git rev...
A flat folder structure can be cool if you have only a few folders but can be painful for huge...
Rails 5.2+ supports "verbose query logs" where it shows the source of a query in the application log.
When you use Sentry to monitor exceptions, an important feature is Sentry's error grouping mechanism. It will aggregate similar...
Ruby's File class has a handy method binary? which checks whether a file is a binary file. This method...
grep is the go-to CLI tool to accomplish tasks like filtering large files for arbitrary keywords. When additional context...
If you migrate a Rails application from Sprockets to Webpack(er), you can either transpile your CoffeeScript files to JavaScript...
CSP hat zum Ziel einen Browser-seitigen Mechanismus zu schaffen um einige Angriffe auf Webseiten zu verhindern, hauptsächlich XSS...
These warnings are printed when the etc Gem is installed, while etc is also included in Ruby. Fix with:
"Open-source software (OSS) is great. Anyone can use virtually any open-source code in their projects." Well, it depends...
If you have a :string or :text field, you should pair it with a model validation that restricts its length...
TL;DR PostgreSQL handles Rails 4+ text and string columns the same. Some libraries may still reflect on the column...
Select2 comes with AJAX support built in, using jQuery's AJAX methods. ... For remote data sources only, Select2 does not...
If you render markdown from user input, an attacker might be able to use this to inject javascript code into...