github.com

Scroll and touch event listeners tend to be computationally expensive as they are triggered very often. Every time the event...

We currently test most of our gems on Travis CI, but want to migrate those tests to Github Actions. This...

makandra dev

While debugging a SPF record I found spf-record.de to be very helpful. it lists all IPs that are covered by...

makandra dev

If you're using the webdrivers gem and VCR together, depending on your configuration, VCR will yell at you regulary...

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

If you migrate a Rails application from Sprockets to Webpack(er), you can either transpile your CoffeeScript files to JavaScript...

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

makandra dev

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

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

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

betterspecs.org

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

We use the whenever gem to automatically update the crontab of the servers we deploy to. By default, whenever will...

makandra dev
thoughtbot.com

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

github.com

The linked GitHub repository is a bit like our "dev" cards deck, but groomed from a single person (Josh Branchaud...

Test-Driven Development (TDD) in its most dogmatic form (red-green-refactor in micro-iterations) can be tedious. It does...

Simplecov is a code coverage tool. This helps you to find out which parts of your application are not tested...

Embedding videos on a website is very easy, add a tag to your source code and it just works...

To find an input with the type hidden, you need to specify the type hidden: find_field('Some label', type...

makandra dev

If you need to test some HTML, e.g. an embed code, you can use RubyMine's "scratch files":

Imagine you want to write a cucumber test for a user-to-user chat. To do this, you need the...

This is a personal post-mortem analysis of a project that was mainly build to provide a REST API to...

PostgreSQL and ActiveRecord have a good support for storing dynamic attributes (hashes) in columns of type JSONB. But sometimes you...