I often see the use of || to set a default value for a variable that might be nil, null or...

ActiveRecord::RecordNotFound errors provide quite meaningful error messages that can provide some insight on application details. Consider the following:

Put the line below in the respective env.rb file to make your action controllers raise an ActionController::UnpermittedParameters error when...

First, go to the webinterface of your phone. Choose Software Update in the navigation on the left. Next, you have...

You can configure a Ubuntu system as a gateway in order to share it's internet connection (maybe via WLAN...

select2 is a great jQuery library to make (large) fields more usable. For Bootstrap 3 there is select2-bootstrap-theme...

Capistrano has the concept of a "rollback" that comes in really handy in case of errors. When you notice that...

Webpack is the future. We're using it in our latest Rails applications. For tests, we want to compile assets...

I needed to make sure that an element is visible and not overshadowed by an element that has a higher...

github.com

When storing a file with Carrierwave, it is always cached prior to actually storing it (to support form roundtrips).

This card will show you a cool way to define a class using Struct.new. A common usecase for Structs are...

makandra dev

If you use the Better Errors gem, you will sometimes notice that it can be very slow. This is because...

When using GROUP BY, MySQL now complains if the SELECT includes columns which are not part of the GROUP BY...

Nowadays it is fairly easy to intercept and modify mails globally before they are sent. All you have to do...

makandra dev

ChromeDriver clicking works by simulating a mouse click in the middle of the element's first client rect (or bounding...

To easily opt out of notifications for a large number of Github repositories, go to https://github.com/watching.

When you have a multi-server setup, you'll be adding a new server from time to time. Before doing...

Rails supports time zones, but there are several pitfalls. Most importantly because Time.now and Time.current are completely different things and...

These tools help you in checking websites globally: DNS Checker This tool allows for global DNS propagation checking. GeoScreenshot

This is useful if, for example, you want to use a background-image that has to scale with the width...

stackoverflow.com

This card will show you how to use git rebase --onto without confusion. Use case: You've got two feature...

Webmocks hash_including is similar to RSpec::Mocks::ArgumentMatchers#hash_including. Be aware that hash_including (webmock v3.0.1) doesn't...

You can use gem list to list all gems available from a remote gem server: gem list -r --clear-sources...

Typhoeus has a different way of representing array params in a get request than RestClient. Typhoeus: http://example.com/?foo[0]=1&foo[1]=2&foo[2]=3