By default, your terminal emulator (Gnome Terminal, Terminator, etc.) sets some kind of window title to reflect the shell type...

There are several tools for DNS debugging which offer you more or less information. Most of the time the more...

The Truemail gem (not to be confused with truemail.io) allows validating email addresses, e.g. when users enter them into a...

In long diffs, it can become impossible to spot small changes in larger blocks of moved code. This may be...

Headless Chrome is a way to run the Chrome browser without a visible window. Configuring Capybara Configure the Capybara driver...

Sometimes you want to find the inverse of an ActiveRecord scope. Depending on what you want to achieve, this is...

If you want to get the path of a file relative to another, you can use the expand_path method...

CSS variables are very different from preprocessor variables. While preprocessors use variables to compile a static piece of CSS, CSS...

When you use Sentry to monitor exceptions, an important feature is Sentry's error grouping mechanism. It will aggregate similar...

Rails middlewares are small code pieces that wrap requests to the application. The first middleware gets passed the request, invokes...

makandra dev

We structure our CSS using the BEM pattern. Our naming convention for blocks, elements and modifiers has evolved over the...

If you want to prevent that two processes run some code at the same time you can use the gem...

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

"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...

Here is an ES5 object literal with two string properties and a function property: let user = { firstName: 'Max', lastName: 'Muster...

makandra dev

RubyMine has a HTTP Client that can be useful to test web APIs. Just create a .http scratch file an...

When an event listener on a DOM element throws an error, that error will be silenced and not interrupt your...

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

To make CSS rules dependent on the screen size, we use media queries: @media (max-width: 500px) { // rules for screen...

Ruby and Rails have several methods for creating a new object that looks like another: clone, dup, deep_dup. When...

When we write a form with date fields, we often use graphical data picker like Rome to get a consistent...

We can use ActiveRecord's where to add conditions to a relation. But sometimes our condition is not on the...

Or: How to avoid and refactor spaghetti code Please note that I tried to keep the examples small. The effects...