If you want to make a screenshot of a website that works well in print or on a high-DPI...

makandra dev

When a Rails controller action should handle both HTML and JSON responses, do not use request.xhr? to decide that. Use...

I recently had fun with replacing a custom video plattform ("mycustomtv") in one of our applications. I learned a lot...

Note netstat has mostly been superseeded by its more modern rewrite ss which nowadays comes pre-installed rather than netstat...

When installing gems, a lot of time is spent building locally installed documentation that you probably never use.

makandra dev
github.com

Katapult 0.3.0 brings Rails 5 and Ruby 2.5 support with a new design, plus a ton of smaller features, fixes...

Enumerable#all? returns true for an empty collection. This totally makes sense but you have to think about it when...

TL;DR Use user.update!(remove_avatar: true) to delete attachments outside of forms. This will have the same behavior as...

This is painful. Consider using Microsoft Office or switching careers. If you need to write < 20 letters consider doing it...

makandracards.com

Rails applications and ruby gems should have a README that gives the reader a quick overview of the project. Its...

curl.haxx.se

When making requests using curl, no cookies are sent or stored by default. However, you can tell curl to re...

You should avoid using application models in your migrations. But how else could you create records in a migration?

When you print (or print preview) and elements are cut off (e.g. after 1st page, or "randomly") you should check...

jsbin.com

If you try to listen to events on elements that are nested inside a , Firefox will stop event propagation once...

By default, browsers will not wrap text at syllable boundaries. Text is wrapped at word boundaries only. This card explains...

github.com

When writing XLSX files, there are gems like rubyXL or axlsx. While they do offer features like formatting or graphs...

relishapp.com

In most projects I know, Cucumber test suite speed is not an issue. Of course, running 350 features takes its...

georgemauer.net

If your application exports CSV, be advised that Excel and other spreadsheet applications treat certain cells (those starting with =, +, - or...

When attempting to update RubyGems, depending on updates your previously performed, you might run into an error ERROR: While executing...

We're usually running Ubuntu LTS versions. Sometimes newer hardware requires packages from more recent Ubuntu releases that only come...

Checking if a JavaScript value is of a given type can be very confusing: There are two operators typeof and...

RSpec allows you to mark a single Example/ExampleGroup so that only this will be run. This is very useful when...

If you already selected an element and want to get its parent, you can call find(:xpath, '..') on it.

github.com

When an Rspec example fails, I usually investigate by running that example again using rspec . However, this does not work...