...can reset the min-width. Say you have a simple grid layout: .container .first-item .second-item .third-item .container display: grid grid-template-columns: 100px 1fr 100px Your expectation...

...correct as the grid layout will try to do that: +---------+----------------------------+---------+ | | - 10 characters long | | +---------+----------------------------+---------+ However, if .second-item's content is too large to fit into the reserved space, it will...

...Doing that enables e.g. man in the middle attacks. If you accept only a single expired and known certificate, you are much less in trouble. Setup All the solutions described...

...below use a verify_callback for the request's OpenSSL::X509::Store where you can specify a lambda to adjust its verification response. Your callback must return either true or...

When you need to find out in which kind of spec you are during run-time, it's definitely possible. It's a lot easier in RSpec 2+.

...consider this global before block where you'd want to run some code for specific specs only: config.before do # stuff that_fancy_method # more stuff end RSpec 2+

keepachangelog.com

...maintain. There are some good practices for writing a changelog that adds value, please stick to these. Add a notice to the README's contribute section about the changelog

...this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## Unreleased - Added `Foo#foo` method. ## 1.0.0 - 2017-06-20 ### Breaking changes - Renamed `Foo...

shifteleven.com

...END__ keyword tells Ruby where a file ends – but you don't have to stop there. Any text you add after it is accessible via the DATA object.

Short reference on how to quickly debug the vanilla Rails job adapters. Queue Adapters by Environment Environment Adapter Jobs Run In Worker Needed? development :async Rails server process No

Not executed (stored) No production :solid_queue Separate worker Yes (bin/jobs) Development (:async) Jobs run in background threads (Concurrent Ruby ThreadPoolExecutor) within the process that called the job.

makandra dev

There are two ways a logout in SAML can happen: Service Provider (SP) initiated and Identity Provider (IDP) initiated logout. I'll explain how to implement both flows with devise...

...on logout and devise does not do that we get a Unsafe redirect to "https://some-idp.example.com/realms/dev/protocol/saml?SAMLRequest=fZJBb9QwEIX%2FSm45zcZx4j...", pass allow_other_host: true to redirect anyway. upon trying to logout.

w3c.github.io

Here is how to use Chromedriver without libraries like selenium-webdriver. This can be useful for debugging. The following example visits a web page and reads the a headline's...

...things you can do with it, but performing more advanced tasks without a tool like selenium-webdriver can be quite difficult. However, for simple debugging or remote-controlling, curl might...

PostgreSQL can cosplay as a full-text search engine. It doesn't have the features or fidelity of ElasticSearch or Algolia, but it's good enough if you just need...

...to search and rank large volumes of text. This card will teach you how to index, search and rank your Rails models in a PostgreSQL full-text index. We will...

...uses a "real" time zone or :local, and if config.active_record.time_zone_aware_attributes is set to false or not. With time zones configured, always use .current for Time, Date, and...

...which hold time zone information and Time.now only in those that run with the server's time. If you don't, bad things can and will happen. More information can...

You most likely never want to do this. But if you do: Model.update_all({:id => new_id}, {:id => old_id...

Jasmine has long standing support for writing asynchronous specs. In days gone by we used the done callback to achieve this, but these days it is possible to write much...

...more readable specs. Async specs As a first example, say we want to check that some form disables the submit button while working. // bad (how we used to do it...

A JavaScript error in an E2E test with Selenium will not cause your test to fail. This may cause you to miss errors in your frontend code. Using the BrowserConsole...

!!driver_logs_proc end def driver_logs_proc browser = page.driver.browser if browser.respond_to?(:logs) # selenium-webdriver >= 4 proc { browser.logs } elsif browser.respond_to?(:manage) && browser.manage.respond_to?(:logs) # selenium-webdriver...

github.com

...in C, with much better performance (20-200x) than the version in the standard library, while being almost completely compatible...

github.com

Reads Active Record's validations and makes them available to live client side javascript

tech.puredanger.com

...that pops up as it’s a thing of beauty in a piece of software that usually is seen as highly unimportant, yet is the first thing you encounter when...

...taking commercial software for a spin...

roughtype.com

...fans of progress, of technology's inexorable march forward, will change their tune as soon as progress destroys something they care deeply about...

37signals.com

...Adobe a few days before the launch of their flagship product, what hope do smaller players hold...

adobe.com

Flash movies (.swf files) can talk with Javascript code embedded in the same HTML page. There are two ways to do this: The preferred way is to use the ExternalInterface...

...ActionScript by calling SetVariable(name, value) on the Flash movie's DOM element. This is super-legacy, but still encountered in the field. Note that communication between a Flash movie...

github.com

You can hook into Slack when using Capistrano for deployment. The slackistrano gem does most of the heavy lifting for you. Its default messages are unobtrusive and can be adjusted...

When deploying, it posts to a Slack channel like this: How to integrate Integrating Slackistrano with Capistrano 3 is fairly simple. If you are not a Slack admin

...and autoload paths. They do NOT create a module for namespacing. This is intuitive, since there normally is no module Model, or module Controller. If you want to add a...

├── models ├── uploaders # No config needed ├── util # No config needed └── workers # No config needed Sometimes it's handy to group files within a directory, but not reflect that grouping within...

It installs precompiled Ruby binaries, so installing a new version will take seconds, not minutes. Install mise Follow the installation guidelines at https://mise.jdx.dev/getting-started.html. Remove rbenv configuration...

...Search for rbenv config in .bashrc and .profile and remove it: eval "$(rbenv init - bash)" Search for rbenv config in .profile and remove it: source /home/$user/.rbenvrc Remove nvm configuration...

makandra dev
wiki.debian.org

This note is a reminder that there is something called AppArmor that could cause weird errors ("File not found", "Can't open file or directory", ...) after configuration changes, e.g. when...

makandra dev

When your application is open for public sign up and sends out transactional e-mails to a large number of users, e-mail deliverability becomes an issue. E-mail providers...

...work hard to eliminate spam and have put in place relatively tight checks what kinds of emails they will accept, and from whom. To that end we use tools like...