In interactive commands, Git allows the user to provide one-letter input with a single key without hitting enter (docs...
Rails middlewares are small code pieces that wrap requests to the application. The first middleware gets passed the request, invokes...
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...
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...
One of the earliest pieces of wisdom we are given as programmers is to not write duplicate code: Don’t...
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...
You can run bundle install in parallel. This might be helpful for development, where you often install many new gems...
In Active Record you can use named bindings in where-conditions. This helps you to make your code more readable...
When we write a form with date fields, we often use graphical data picker like Rome to get a consistent...
Because colors improve readability so much. On Ubuntu 18.04 you can install it with sudo apt install grc
We can use ActiveRecord's where to add conditions to a relation. But sometimes our condition is not on the...
To set a default Node version for new shells, use nvm alias default : nvm alias default 1.2.3
Or: How to avoid and refactor spaghetti code Please note that I tried to keep the examples small. The effects...
This checklist should help you to check edge cases that are not part of the default Carrierwave configuration.
Debugging image color profiles is hard. You can't trust your eyes in this matter, as the image rendering depends...
Browsers come with a set of built-in elements like or . When we need a new component not covered by...