Copy the attached file to features/support. This gets you a convenience method: Capybara.javascript_test? Is true for Selenium, capybara-webkit...

Working with lists in Javascript is painful because the native Array class is so poorly designed. One way to reduce...

angular-tips.com

Angular comes with different types of services. Each one with its own use cases. All of these services are singletons...

github.com

The asset pipeline (which is actually backed by sprockets) has a nice feature where templates ending in .jst are compiled...

Consul 0.10.0 now allows multiple power mappings for nested resources. When using nested resources you probably want two power

Box shadows are awesome. Unfortunately they are also very costly to render. You will rarely notice the rendering time on...

makandracards.com

So you're hunting down a regression (or just a bug) and want to use git bisect to find out...

We tend to use database transactions as a magic bullet to get rid of all our concurrency problems. When things...

For websites that don't do JavaScript rendering on the client, it's best practice to put script tags at...

Use the click method on the DOM element: let link = document.querySelector('a') link.click()

Connect to your memcached host. (AWS elasticache is memcached) telnet foohost23.cs2631.0001.euw1.cache.amazonaws.com 11211 Once you're connected, find out which 'slabs...

Set the hash to a dummy hash which doesn't hit any id at your page, for example: window.location.hash = "_";

This card shows how to upgrade a Rails 2 application from Rails 2.3.8 through every single patch level up to...

Coffeescript allows you to create classes whose methods are automatically bound to the correct this. You can do this by...

Our development process makes us deploy very often. As the number of releases grows, junk clogs up the hard drive...

Getting a regular expression from a string in JavaScript is quite simple: new RegExp('Hello Universe'); # => /Hello Universe/

This trick might be useful to implement more complicated directives in AngularJS. I needed it to do drag'n'drop...

Authentication is hard: there are many edge cases, and most users (including yourself) usually only go the "happy path" once...

When you want to do a git diff but do not care about the full diff and just want to...

tl;dr: Ruby's Bundler environment is passed on to system calls, which may not be what you may want...

Note: This technique is confusing and slows down your test suite. Copy the attached code to features/support. This gets you...

stackoverflow.com

TL;DR: Variables not declared using var are stored outside the current scope, most likely in the global scope (which...

When a controller action redirects to an external URL (like http://somehost.com/some/path) you will find that this is hard...

The following code doesn't work like expected: page.find(css_selector).find(other_css_selector) The second .find will search...