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

makandra dev
thoughtbot.com

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

millarian.com

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

github.com

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

makandra dev

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

Install the latest bundler version: gem install bundler Fetching bundler-2.3.5.gem Successfully installed bundler-2.3.5 1 gem installed Update the bundler...

api.rubyonrails.org

ActiveSupport (since 4.1) includes test helpers to manipulate time, just like the Timecop gem: To freeze the current time, use...

This is a bookmarklet you can add to Chrome or Firefox which will allow you to create a story in...

Capybara provides execute_script and evaluate_script to execute JavaScript code in a Selenium-controlled browser. This however is not...

gedd.ski

Within a Flexbox layout, there are multiple CSS attributes that may affect a child's basis (the initial width before...

Rails is split into a large number of (sub-) frameworks. The most important and central of those are activesupport (extends...

When a user shares your content, a snippet with title, image, link and description appears in her timeline. By default...

You can share a state in Ruby with global variables. Even if you should avoid them whenever possible, for debugging...

When an AJAX request raises an exception on the server, Rails will show a minimal error page with only basic...

makandra dev

webpack is a very powerful asset bundler written in node.js to bundle (ES6) JavaScript modules, stylesheets, images, and other assets...