You can not use the hash_including argument matcher with a nested hash: describe 'user' do let(:user) { {id: 1...

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

Capistrano has the concept of a "rollback" that comes in really handy in case of errors. When you notice that...

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

Rails default config uses the ActiveSupport::Cache::NullStore and disables controller caching for all environments except production: config.action_controller.perform_caching = false...

When you have a multi-server setup, you'll be adding a new server from time to time. Before doing...

Rails supports time zones, but there are several pitfalls. Most importantly because Time.now and Time.current are completely different things and...

Webmocks hash_including is similar to RSpec::Mocks::ArgumentMatchers#hash_including. Be aware that hash_including (webmock v3.0.1) doesn't...

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

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

Database connections are not thread-safe. That's why ActiveRecord uses a separate database connection for each thread.

makandra dev

This card compares patterns to store trees in a relation database like MySQL or PostgreSQL. Implementation examples are for the...

github.com

The parallel-gem is quite easy to use and can speed up rendering time if you want to render the...

When filling out forms in Selenium tests, Chrome shows the (usual) bubble, asking to store those credentials. While the bubble...

ImageMagick has a command line tool called identify which can read image metadata: >identify -verbose DSC00136.JPG Image: DSC00136.JPG Format: JPEG...

Note: The behaviour of Spreewald's within step is as described below for version < 1.9.0; For Spreewald >= 1.9.0 it is...

makandra dev

Below is a list of some VIM settings I find useful. You can add them to your .vimrc. source $VIMRUNTIME/mswin.vim...

Just like we use gems on the server, we use third party JavaScript libraries in the browser. These typically provide...

We generally use multiple application servers (at least two) and you have to search on all of them if you...

If you use Angular 1.4+ together with Angular Animate, all ng-show, ng-hide, ng-class etc. are animated on...

If you have a replication error with MySQL and you know the "error" is okay (e.g. you've executed the...

First find the reference for the entry you want through looking at the stash: $ git stash list stash@{0}: WIP...

TLDR: A function is hard to use when it sometimes returns a promise and sometimes throws an exception. When writing...