.desktop files define launchers for applications installed on your machine. They specify the command that will be executed when launched...

The sidekiq-rate-limiter gem allows rate-limiting Sidekiq jobs and works like a charm. However, it needs to be...

ActiveRecord provides the ids method to pluck ids from a scope, but what if you need to pluck Global IDs...

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

A flat folder structure can be cool if you have only a few folders but can be painful for huge...

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

Ruby's File class has a handy method binary? which checks whether a file is a binary file. This method...

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

"Open-source software (OSS) is great. Anyone can use virtually any open-source code in their projects." Well, it depends...

Nokogiri is great. It will even fix invalid HTML for you, like a browser would (e.g. move block elements out...

makandra dev

# Basic HTML example # Javascript API (notable methods and properties) video = document.querySelector('video') video.play() video.pause() video.load() // Reset to the beginning and...

postgresql.org

TL;DR PostgreSQL handles Rails 4+ text and string columns the same. Some libraries may still reflect on the column...

In a web application you sometimes have tasks that can not be processed during a request but need to go...

github.com

An unresponsive service can be worse than a down one. It can tie up your entire system if not handled...

Speaker today is Henning Koch, Head of Development at makandra. This talk will be in German with English slides.

We use CarrierWave in many of our projects to store and serve files of various formats - mostly images. A common...

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

betterspecs.org

betterspecs.org is a documentation on how to write better RSpec tests. Note that there are also other approaches like The...

makandra dev

With Rspec you can mock objects or functions, for example like this: expect(my_object).to receive(:my_function).and...

makandra dev
thoughtbot.com

One of the earliest pieces of wisdom we are given as programmers is to not write duplicate code: Don’t...

This seems to be obvious, but you can expect Rake tasks to be called in RSpec. it 'deletes all Users...

In case you want to use pry with an older version of Ruby, you can try the following configurations.

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

You can install rubygems 3.0.8 (released on February 18, 2020) to keep all the Gem::Specification#rubyforge_project deprecation warnings...