makandra dev
css-tricks.com

All new browsers support the new object-fit CSS property. It allows to specify how an element behaves within its...

github.com

Ever needed to use a global variable in Rails? Ugh, that's the worst. If you need global state, you...

Reading user input in console applications is usually done using Kernel#gets. Stubbing that can be a bit hairy.

When testing Ruby code that prints something to the terminal, you can test that output. Since RSpec 3.0 there is...

makandra dev
stackoverflow.com

IE has a "Compatibility Mode" for old browsers. You can keep IE from offering it (and fix some other things...

willmore.eu

The linked site hosts a simple test. It shows two images with narrow vertical/horizontal lines. The more they resemble each...

PostgreSQL uses the C library's locale facilities for sorting strings: First, all the letters are compared, ignoring spaces and...

jakearchibald.com

The way that Javascript schedules timeouts and promise callbacks is more complicated than you think. This can be the reason...

As your Rails project grows, you will accumulate a number of small patches. These will usually fix a bug in...

to create a Gallery that has a name and has_many :images, which in turn have a...

jqueryui.com

UI sortable helps reordering items with drag 'n drop. It works quite fine. Proven configuration for sorting table rows

makandra dev
browsercookielimits.squawky.net

TL;DR If you want to support most browsers, then don't exceed 50 cookies per domain, and don't...

Spreewald gives you the within meta step that will constrain page inspection to a given scope. Unfortunately, this does not...

relishapp.com

When you find yourself in the situation that you would like to define a custom matcher in your specs, but...

To delay your entire Jasmine test suite until the DOM is ready, add the following: beforeAll(function(done) { $(done); });

github.com

fake_stripe spins up a local server that acts like Stripe’s and also serves a fake version of Stripe.js...

When you run rake db:rollback and nothing happens, you are probably missing the latest migration file (or have not...

guides.rubyonrails.org

ActiveRecord offers an explain method similar to using EXPLAIN SQL statements on the database. However, this approach will explain all...

When dealing with time zones in Rails, there is one key fact to keep in mind: Rails has configurable time...

Expecting a primitive value as an argument to a method invocation is easy: expect(object).to receive(:foo).with('arg1...

Cucumber's docstrings let you add long strings to a step like this: # foo.feature Given this text: """ First line

OAuth requires a set of params to be carried along requests, among which a nonce. Some libraries pass these along...

You can use JavaScript to get or set cookie values on the client. Using the vanilla JavaScript API

jQuery's deferred objects behave somewhat like standard promises, but not really. One of many subtle differences is that there...