RSpec allows defining methods inside describe/context blocks which will only exist inside them. However, classes (or any constants, for that...

There are several gems that make it easy to read and process xlsx files. Parsing the entire file at once...

gist.github.com

Here is some JavaScript code that allows you to click the screen and get the clicked element's text contents...

You should prefer native promises to jQuery's Deferreds. Native promises are much faster than their jQuery equivalent. Native promises...

Native promises have no methods to inspect their state. You can use the promiseState function below to check whether a...

You can use local copies of gems in your Gemfile like this: gem 'spreewald', path: '~/gems/spreewald' As soon as you...

github.com

rack-cargo gives your API a new /batch route that lets clients perform multiple API calls with a single request...

github.com

Use Traim to build a RESTful API for your ActiveRecord models with very little code. Traim assumes your API resources...

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

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

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...

Shoulda Matchers don't provide canditional validations (validations with if: option). Here is how to write tests for the condition...

makandra dev
rawgit.com

RawGit serves raw files directly from GitHub with proper Content-Type headers, for CDN-like purposes. Note that they don...

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

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.

stackoverflow.com

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

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

Middleman is a static page generator that brings many of the goodies that Rails developers are used to.

Sometimes, through some firewall or proxy misconfiguration, you might have to deploy to a server that cannot access the git...

makandra dev
stackoverflow.com

Assuming you're wanting to undo the effects of git rm or rm followed by git add -A or something...