We're usually running Ubuntu LTS versions. Sometimes newer hardware requires packages from more recent Ubuntu releases that only come...
Checking if a JavaScript value is of a given type can be very confusing: There are two operators typeof and...
When an Rspec example fails, I usually investigate by running that example again using rspec . However, this does not work...
An end-to-end test (E2E test) is a script that remote-controls a web browser with tools like Selenium...
Slides for Henning's talk on Sep 21st 2017. Understanding sync vs. async control flow Talking to synchronous (or "blocking...
TL;DR: Bundler 2.0 will rename Gemfile to gems.rb and Gemfile.lock to gems.locked (sic). The old filenames will be supported...
RSpec allows defining methods inside describe/context blocks which will only exist inside them. However, classes (or any constants, for that...
On my Ubuntu MATE machine, switching applications with ALT + TAB was impossible, because it took nearly 2 seconds. The culprit...
If another session is accessing your database you are trying to reset or drop you might have seen the following...
Use return to return from a method. return accepts a value that will be the return value of the...
I frequently find myself needing a combination of group_by, count and sort for quick statistics. Here's a method...
There are many approaches out there how you can import data from a legacy application to a new application. Here...
You should prefer native promises to jQuery's Deferreds. Native promises are much faster than their jQuery equivalent. Native promises...
In the ruby shell (IRB) and rails console the return value of the previous command is saved in _ (underscore). This...
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...
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