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

If you want to see how long your database queries actually take, you need to disable MySQL's query cache...

...also packaged as a snap. A snap will always track a channel (like stable, beta) and automatically update to the newest version available in this channel. By default the snap...

channels: stable: 2018.3.2 (72) 269MB classic candidate: 2018.3.2 (72) 269MB classic beta: 2018.3.2 (72) 269MB classic edge: 2018.3.2 (72) 269MB classic 2018.3/stable: 2018.3.2 (72) 269MB classic 2018.3/candidate...

...issue with this pattern/approach. What's happening? Consider these classes: class Post < ActiveRecord::Base belongs_to :thread def thread_title thread.title end end class Thread < ActiveRecord::Base has_many :posts...

...post.thread is not actually a Thread even though looking at its class makes you believe so: post.thread.class => Thread Its real class is ActiveRecord::Associations::BelongsToAssociation which is sometimes exposed, for...

...being used by default (which may be annoying). Here is how to do that. Beware: By following the steps below, you will drop and recreate your cluster. You will lose...

...As an example, we will be modifying 9.5 main (running on port 5435) below. Become a PostgreSQL superuser sudo su postgres Backup entire database pg_dumpall -p 5435 > 5435.sql

Imagine you want to write a cucumber test for a user-to-user chat. To do this, you need the...

Intel CPUs receive updates, including security relevant upgrades, through 2 channels: Firmware/UEFI BIOS updates can also update the microcode in...

When such a virtual attribute should contain integer values you might get unexpected behavior with forms, because every param is a string and you don't get the magic...

Usually you add errors to :base in ActiveRecord, in case no appropriate attribute could be used to add the error...

You can tell npm to install a package globally with npm -g install @puppeteer/browsers. However, it seems that its not...

...guest from the CD, open a terminal (on the guest, not the host!) and become root: sudo su fdisk -l to see the disk information. \ There should be one drive...

Terraform (and terragrunt) gives a lot of output when running plan or apply, outputting a lot of progress information when...

=> >> response.code => 422 FYI, the http gem is a great alternative to RestClient which behaves like that by default and has a well-designed API in general (much better than...

docs.ruby-lang.org

The sprintf method has a reference by name format option: sprintf("% d : % f", { :foo => 1, :bar => 2 }) # => 1 : 2.000000

Chromedriver (or selenium-webdriver?) will not reliably scroll elements into view before clicking them, and actually not click the element...

In case you want to use pry with an older version of Ruby, you can try the following configurations.

makandra dev

...its version number, it is considered a pre-release: 1.0.0.rc1 2.3.0.alpha2 3.0.0.beta3 4.0.0.pre.rc2 Even if a pre-release gem has the highest version number, it is...

...Semantic versioning Converted RubyGems version 1.0.0-rc1 1.0.0.pre.rc1 2.3.0-alpha2 2.3.0.pre.alpha2 3.0.0-beta3 3.0.0.pre.beta3 Note that npm packages force you to use Semantic Versioning's naming convention...

makandra dev

As an application exists, data accumulates. While you'll be loosely monitoring the main models' record count, some supportive database...

tl;dr: Avoid to memoize methods with default (keyword) arguments! When you are using Memoized with default arguments or default...

...find dead code in puppet projects. To use it, (as of now) it's best to get the latest version from git, as the last release is not yet on...

...request: "GET /index.html HTTP/1.1", upstream: "http://198.51.100.123:80/index.html", host: "192.0.2.10:80" The cause This behaviour was caused by an application that transforms parts of the query from the URL into...

If you use a newer SSH key generated with the ED25519 algorithm instead of RSA (see Create a new SSH...

This note describes how to kick a user out of a Rails application after she hasn't requested an action...

Wondering what these numbers in the mount entries in /etc/fstab are meaning? The first number fs_freq When this field...