Testing file download links in an end-to-end test can be painful, especially with Selenium. The attached download_helpers.rb provides...

One of the many useful features of TextMate is autocompletion of words. If I were in TextMate right now, I...

makandra dev

If you're frequently switching between projects, you might be annoyed by RubyMines behavior of opening the last project on startup. After all loading a project takes a few seconds...

...a dialog to choose the project to open. This can be set under Appearance & Behavior > System Settings > Project > Reopen projects on startup. Switching to other projects A helpful dialog for...

PostgreSQL uses the C library's locale facilities for sorting strings: First, all the letters are compared, ignoring spaces and...

jakearchibald.com

The way that Javascript schedules timeouts and promise callbacks is more complicated than you think. This can be the reason...

...Grouping-Results). But this seems not the be the whole truth. Instead the...

...syntax behaves like Go's Ellipsis expression which is used to pass a list as multiple parameters...

...to a Variadic Function. You can use this behavior for example if you want to merge a list of maps into one map: locals { list_of_maps = [ { "key1" = "value1"

makandra dev

...a strategy to manually enable certain origins to interchange data. Because CSRF exploits browser behavior, its mitigation CORS is also implemented by browsers. CORS procedure The CORS workflow is basically...

Starting with Rails 7.1 the production logger is set to standard out. For applications running with opscomplete ensure to keep...

rspec.info

Note Don't use reruns as a mean to work around flaky tests. You should always try to fix those...

trac.nginx.org

When using many or very long entries of MIME-types that shoudl be gziped in gzip_types directives in nginx...

georgemauer.net

If your application exports CSV, be advised that Excel and other spreadsheet applications treat certain cells (those starting with =, +, - or...

api.rubyonrails.org

Instantiating ActiveRecord objects comes expensive. To speed up things, you can choose a more direct way to talk to your...

tl;dr Don't forget require 'English' if you use a named global such as $LAST_MATCH_INFO. Otherwise this...

All direct child directories of app are automatically added to the eager- and autoload paths. They do NOT create a...

Insomnia is a GUI tool to help you communicating with an API. There are also other tools to do this...

makandra dev

...to the original file Versions are generated based on the processed original file Callbacks (before/after) are applied to original file and each version by itself Under the hood, a version...

Ubuntu 18.04 uses systemd to manage services. There are basically two commands for listing all services and manipulating the state...

When configuring prometheus scrape_configs, you may use relabel_configs to filter your metrics or change some fields. Your config...

In the following example the method update_offices_people_count won't be called when office_id changes, because it...

...like keeping some HTML. If you only care about line breaks, you might be better off using a small, specialized helper method: def format_linebreaks(text) safe_text = h(text...

When using virtual attributes, the attached trait can be useful to automatically copy errors from one attribute to another.

In the Gitlab settings the flag Auto-cancel redundant pipelines is enabled by default. This auto-cancels jobs that have...

...the joins, and then authors for the pluck clause. The first corresponds to the belongs_to relationship, and the latter is the name of the db table. You could even...

First find the reference for the entry you want through looking at the stash: $ git stash list stash@{0}: WIP...