If your external displays not switching on or showing a weird behavior (for e.g. all displays getting the same configuration all the time) you can fix it by switching off...

...in the first step. Afterwards you can apply your whole configuration via xrandr. This behavior could be a bug in the kernel and may be fixed in linux 4.8.

On some of our older projects, we use the mysql2 gem. Unfortunately, versions 0.2.x (required for Rails 2.3) and...

Instead of using this hack you might want to use MariaDB 10.x which can work with both old and...

In a web application you often need to move data between the client (HTML, Javascript) and the server (Ruby, Rails...

bugs.ruby-lang.org

TL;DR Under certain circumstances, dynamically defined symbols may break keyword arguments in Ruby 2.2. This was fixed in Ruby...

makandra dev

Never use raise_error without specifying the Error you expect. expect { do_a_lot_of_complicated_stuff }.to raise_error...

...after hooks. But, just like the default task, it calls update_code at the beginning, symlink to link the "current" path and restart once all done. -- Those are the hooks...

...first update the code and then migrate -- making the deploy:update_code hook the better choice...

...way to calculate the signature is to use an HMAC. Unfortunately, I don't believe you can calculate a proper HMAC in a regular Apache installation. Instead, we do something...

ariejan.net

...to choose smaller column sizes for performance (it won't matter until your project becomes big, so don't worry about it for now). Integer column lengths, mediumint, bigint, and...

github.com

The linked rbenv plugin rbenv-each is very helpful to keep QoL gems up to date that are not part...

...include(3, 4, 5) evaluates to: NOT( .to include(3, 4, 5) ) However, it behaves like: .to (NOT include(3) && NOT include(4) && NOT include(5) ) Warning

bugs.launchpad.net

Terminator has a cool feature that allows you to split your terminal into many panels and type in all of...

...to when precompiling your assets, and give your stylesheets access to all the regular bells and whistles (like asset_path, proper @imports etc): class DynamicStylesheetsController < ApplicationController def show logical_path...

Rails comes with a Rake task notes that shows code comments that start with "TODO", "FIXME", or "OPTIMIZE".

...the first time it was referred to, causing user to be loaded, which Ruby believed it had not seen before. And that caused a completely different spec to fail at...

There seems to be no built-in matcher in RSpec to check if a string contains terms in the desired...

With puma you can have concurrent requests. There are two concepts on how Puma can handle two incoming requests: Workers...

tl;dr: Do not use merge! for session hashes. Use update instead. Outline Let's assume you're modifying the...

a fraction, with a decimal point before it. I.e., -M5 becomes 0.5, and is thus the same as -M50%. Similarly, -M05 is the same as -M5...

makandra dev

Spreewald now has a spreewald binary that lists all available steps, optionally filtering them. Example: $> spreewald # All Spreewald steps

To achieve this goal you have to setup the session store like the following example: MyApp::Application.config.session_store( :cookie_store...

tl;dr Since Rails 6.1+ you can use .compact_blank or .compact_blank! to remove blank values from collections (e.g...

...it with additional joins or conditions. We call this chaining scopes. In practice chaining becomes problematic when scope chains grow more complex. In particular having JOINs in your scope will...

...year is the week with January 4th in it. All days in this week belong to the year. This means that January 1st, 2nd and 3rd may or may not...

...the year. I am not sure which year December days in the same week belong to, I believe the week actually gets split into two calendar weeks in two different...