makandra dev

The Rails asset pipeline improves delivery of application assets (javascripts, stylesheets, images, fonts). Here are some basic facts about its...

When storing files for lots of records in the server's file system, Carrierwave's default store_dir approach may...

xaprb.com

The linked article explains how to get a database-wide lock without creating table rows: This article explains how I...

With cd .. you can navigate one directory up from the one you are at now. If you use that a...

redis.io

In production, you (or your ops team) should configure a maximum number of bytes that Redis can use to store...

...per group but only one value can be picked for the results. The default behaviour of MySQL prior to version 5.7 will not complain and arbitrarily choose a value. But...

const wordBreaks = { 'Fahrsicherheitstraining': "Fahr\xADsicherheits\xADtraining", 'Fahrsicherheitszentrum': 'Fahr\xADsicherheits\xADzentrum', 'Kreisverkehrswacht': 'Kreis\xADverkehrswacht', 'Berufsgenossenschaft': 'Berufs\xADgenossenschaft', } const keys = Object.keys(wordBreaks) function textNodes(node){ let textNodes = [] let walk = document.createTreeWalker(node...

...get rather expensive and doing it for every long word does not make it better, but in my case the pages are not very content-heavy and there is no...

Inside before :each blocks you can refer to variables that you introduce via let later on. They do not need...

When the Ruby parser module of Ruby-GetText comes across a file in one of its search directories (e.g. lib/scripts...

When you use the send_file method to send a local file to the browser, you can save resources on...

Du verstehst was eine Custom Resource ist und warum das nützlich sein kann. Du weißt, was ein Operator ist...

In Ruby you can communicate between processes with sockets. This might be helpful in tests that validate parallel executions or...

makandra dev
litmus.com

...a lot more, you can think of it as a "Browserstack for mail clients". Best practices Use tables for layouting. Use these HTML attributes: align="center", width="100%", valign="top...

...In a second tab, open a preview of your designed HTML mail. It's best to take it from Staging, so that assets (images!) will be available to litmus during...

Capybara added a deprecation warning in version 3.35.3 (version from 2019) that shows up if your selector is not of...

RubyMine offers you to exclude directories from search, meaning faster search results and less "noise" in the list of result...

Sometimes, the rails dev server doesn't terminate properly. This can for example happen when the dev server runs in...

Within Capybara you most certainly use the #check- and #uncheck-method to (un)check checkboxes. But there's one problem...

...to a value. The validation is skipped silently when terms is nil. While this behavior is useful to validate acceptance in the frontend and not the admin backend, it also...

Active Record's select method allows you to make use of the power of MySQL select statements. On the one...

The cards editor has a feature "Cite other card" to create links to other cards in the same deck as...

Yesterday, Rails fixed a security issue (CVE-2014-3514) in Rails 4+. It was possible to use .where...

accepts_nested_attributes_for :children validates_associated :children end class Child < ApplicationRecord belongs_to :parent, inverse_of: :children end class Child::AsForm < ActiveType::Record[Child] change_association :parent...

...AsForm record with nested Child::AsForm records, the children will not be saved. This behavior also applies to the case where you override the association with has_many :children,...

...and...

...new RegExp('^(\\d+) users') # => /^(\d+) users/ Our expression above now works only at the beginning of the matched string, looks for a number (\d+ [1]) and also captures that. Sweet...

Capybara gives you two different methods for executing Javascript: page.evaluate_script("$('input').focus()") page.execute_script("$('input').focus()")