github.com

This might be relevant for us since we're often managing customer documents in our apps. I played around with...

Since Rails 7 you are able to encrypt database information with Active Record. Using Active Record Encryption will store an...

github.com

...multiple subsequent occurrences of a given character with a single one Use Tap For Better Test Data Setup let(:order) do create(:order, name: "My Order").tap do |order|

When changing glibc versions, it's possible to end up with corrupt indexes in PostgreSQL. Are My Indexes Affected?

You can use the code below to check whether the browser can make connections to the current site: await isOnline...

...rough setting (e.g. open Photos with Shotwell Viewer). If a certain file type (or better mime type) should be opened with a different application, this can be set via command...

bundler.io

...version you want to use for each bundler command, e.g. bundler _2.1.4_ update New behavior Bundler now honors the version specified under BUNDLED_WITH in the Gemfile.lock. The necessary version...

gem update --system Updating the bundler version for a project With the new behavior bundler should never update its version in a Gemfile.lock automatically anymore. Therefore, unless there are...

For searching in large database tables we usually use PostgreSQL's fulltext search capabilities. While this works reasonably well for...

...until we know for sure which image version we will need and the solution becomes very simple. Here is a small helper function for your mailer views: def inline!(version...

docs.aws.amazon.com

...of your workload, a fixed-CPU instance from the M or C series offers better performance for a lower price. General T instances have a Baseline utilization per vCPU.

...Every burstable instance has a CPU utilization break-even when a fixed-CPU instance becomes cheaper. The fixed CPU instances are not only cheaper at that point, they also offer...

...least modularity 3.1.0. Compare implementations Now compare your implementations. Which one do you like best? Does modularity offer features the other approaches don't...

We are using the BEM pattern ("Block, Element, Modifier") to structure our CSS in all new projects. We try to migrate legacy projects to BEM, block-by-block. Read

...it important modifiers start with -? More examples Look at some examples of a good BEM structure in the DOM tree of these websites: https://makandra.de/ https://railslts.com/ https://www.aitiraum.de/

tl;dr Individual transform properties are great because they allow you to write more readable and maintainable CSS, especially when...

Redis.current will be removed without replacement in redis-rb 5.0. Version 4.6.0 adds deprecation warnings for Redis.current and Redis.current=: `Redis.current...

...Just take a step back and evaluate its usefulness first. Also, consider if its benefits outweigh the cost of teaching and maintaining the new thing. Being a good open-source...

...set :bundle_without, %w{development test cucumber deploy}.join(' ') Be aware, that gems that belong to two groups, are only excluded, when both of the groups are excluded, e.g. to...

makandra dev

Basic error pages To add a few basic styles to the default error pages in Rails, just edit the default...

Ubuntu 24 added some guarding for Python packages which no longer allows installing applications through pip on system level. Instead...

...will happen and will have effect. But what we can observe is that the behaviour of the callback function :my_method does not happen in the test, as if the...

If you're using a Redis cache in Rails (e.g. :redis_cache_store), it's possible to configure additional parameters...

Newer versions of Bundler (at least since 2.3) have two different behaviors: If your Gemfile.lock reads PLATFORMS: ruby, it might either install a compatible platform-specific version...

...or similar), bundler will install exactly the versions indiciated in the Gemfile.lock. Fix For better consistency, I would advise to make sure you always have PLATFORMS x86_64-linux

JavaScript is a scripting language supported by all browsers. Browsers don't speak Ruby, so if we want to implement...

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

regular-expressions.info

Look-arounds provide a way to match context-dependant. You can look-behind, look-ahead and to both in a positive and negative way. The look-around will...

...Modifiers in Ruby Add modifiers after the final slash, e.g. /Regex/im, or at the beginning of the regex, e.g. /(?i)regex/. i: case insensitivity m: make the .-character also match...