github.com

Masonry is a famous library to dynamically arrange a grid of items that have different aspect ratio, like horizontal and...

github.com

For Sidekiq to be able to retry your jobs it has to be able to catch errors that occur while...

A JavaScript error in an E2E test with Selenium will not cause your test to fail. This may cause you...

developer.mozilla.org

...HTML's accepts a single file. You can allow multiple files via . But sometimes, selecting multiple files is not enough...

plnkr.co

Flexbox is awesome. Most of it even works in IE11, but flex: 1 won't work reliably in Internet Explorer...

web.archive.org

Restricting access to cookies is essential for security in many web apps. For example, the session ID, the secret token...

Most forms have a single submit button that will save the record when pressed. Sometimes a form needs additional submit...

At makandra, we've built a few gems over the years. Some of these are quite popular: spreewald (> 1M downloads...

Google Chrome has a subtle rendering bug that hits me once in a while. It usually occurs in sliders with...

Haml lets you prefix a group of attributes by wrapping them in a hash. This is only possible with the...

makandra dev

Option 1: JSON dump In config/webpack/environment.js you can get inspect environment which includes all webpack config options set for the...

As a web developer, you know Google Analytics (GA). Probably you've dropped the GA snippet into more than one...

Why secure-only cookies used to be necessary Cookies have an optional secure flag. It tells the browser to not...

Rails defines a #truncate helper as well as a method String#truncate. = truncate("my string", length: 5) = "my string".truncate...

makandra dev
litmus.com

The 90s are calling: they want their tables back. Unfortunately, you need them all for laying out your HTML emails...

stackoverflow.com

Ruby has this handy block shortcut map(&:to_i) for map { |x| x.to_i }. However, it is limited to argument...

makandra dev
developer.mozilla.org

Here is how to model basic logic in media queries. AND With keyword and. # Target viewport widths between 500 and...

caniuse.com

Since late 2015, all major browsers (still excluding Firefox) support pointing device media queries. These can be used to distinguish...

rspec.info

RSpec let's you chain a matcher with .or. The expectation will then pass if at least one matcher matches...

developer.mozilla.org

Browsers' printing methods usually don't print background colors. In most cases this is the desired behavior, because you don...

caniuse.com

There is a kinda secret, yet well supported CSS feature called currentColor. It's like a special CSS variable that...

guides.rubyonrails.org

TL;DR Append your locale keys with _html to have them marked as html_safe and translate them with = t...

github.com

Using the JS fullscreen API is painful because all browers use different methods and events and you need to use...

When your application is running on a multi-server setup, application logs are stored per server (unless you choose a...