When restoring a PostgreSQL dump using pg_restore, you usually add the --clean flag to remove any existing data from...

When building an application that sends e-mails to users, you want to avoid those e-mails from being classified...

makandra dev
developer.mozilla.org

The standard way to abort async code is that your function takes a AbortSignal { signal } property. The caller can use...

makandra dev

Suggested Workflow Set the ruby version in .ruby-version to 2.3.5, then perform these steps one by one, fixing errors...

When doing Basic Authentication, your browser will send an "Authorization" header. Its value is simply a Base64-encoded representation of...

In ruby you can easily read and write CSVs with the standard CSV library class. On top of this, you...

makandra dev

To restart all tasks monitored by God, don't use god restart. This command is only meant to soft-restart...

Cucumber has an output format that prints step definitions only. You can use this to find unused ones: Temporarily add...

When upgrading Rails versions -- especially major versions -- you will run into a lot of unique issues, depending on the exact...

The Ace editor is a great enhancement when you want users to supply some kind of code (HTML, JavaScript, Ruby...

makandra dev

If your Rubymine does not recognize a file type correctly although you have entered the unmistakeable file extension like material_orders_controller.rb...

We figured out, that ActiveJob Inline might lead to autoloading problems in development. The result was an exception when running...

codepen.io

Occasionally, your designer will hand you designs where elements break the layout's horizontal container width, like navigation buttons of...

Accessing pseudo elements via JavaScript or jQuery is often painful/impossible. However, accessing their styles is fairly simple. Using getComputedStyle

github.com

There are two ways to lock a user in devise. Using the lockable module Customizing the user account status validation...

api.jquery.com

jQuery's removeClass removes the given class string from an element collection. If you want to remove multiple/unknown classes matching...

relishapp.com

When you are using lambdas in RSpec to assert certain changes of a call, you know this syntax: expect { playlist.destroy...

docs.ruby-lang.org

Percent Notation We already know that that we can create strings using the percent notation: %(<foo="bar's ton">) is...

developers.google.com

Mobile Chrome and Safari support the "web share API" which allow you to use the native share functionality of an...

Geordi uses parallel_tests if available for running the test suite. To debug an application it is very unhandy to...

It is possible to access Rails config (for example secrets) from within your webpack bundles, thanks to rails-erb-loader...

When debugging your application, you will come across objects created by some gem or framework. You don't have the...

Font Awesome 5 is a comprehensive solution for vector icons on your website. Originally, Font Awesome came as an icon...

S3cmd is a free command line tool and client for uploading, retrieving and managing data in Amazon S3. S3cmd reads...