markodenic.com

Table of content for the linked article: 1. The `loading=lazy` attribute 2. Email, call, and SMS links

Matching the "space" character class For matching whitespaces in a regular expression, the most common and best-known shorthand expression...

makandra dev

Webpack builds can take a long time, so we only want to compile when needed. This card shows what will...

To attach files to your records, you will need a new database column representing the filename of the file...

makandra dev

In Ruby (almost) everything is an Object. While this enables a lot of powerful features, this concept might be confusing...

The ActionDispatch module of Rails gives you the helper method flash to access the flash messages in a response.

CarrierWave comes with a set of default configuration options which make sense in most cases. However, you should review these...

getbootstrap.com

Recently I made an upgrade from Bootstrap 3 to Bootstrap 4 in a bigger project. Here are some tips how...

Consider the following models and form models: class Parent < ApplicationRecord has_many :children, class_name: 'Child', foreign_key: 'parent_id...

makandra dev

Rails 6 includes a WYSIWYG editor, Action Text. It works out of the box quite well, but chances are that...

Rails supports alert and notice as default flash types. This allows you to use these keys as options in e.g...

makandra dev

I just finished migrating a project from the Asset Pipeline to Webpacker, this is what my diff to master looks...

The Truemail gem (not to be confused with truemail.io) allows validating email addresses, e.g. when users enter them into a...

TinyMCE is a WYSIWYG editor which is quite customizable. Add a custom button to the tinyMCE toolbar and tell tinyMCE...

thoughtbot.com

The linked blog post contains some background information about the alt attribute and the figure / figcaption element. It is interesting...

tekin.co.uk

Git diffs show the surrounding contexts for diff hunks. It does so by applying regular expressions to find the beginning...

Here is a short summary of Cucumber hooks in Ruby taken from https://github.com/cucumber/cucumber-ruby. Note that the BeforeStep is...

web.archive.org

There is a common view that extracting text from a PDF document should not be too difficult. After all, the...

simple-form-bootstrap.plataformatec.com.br

Good reference how to build bootstrap forms with simple_form.

After a recent Ubuntu update I didn't see the main menu bar of the RubyMine IDE (File | Edit | View...

CSP hat zum Ziel einen Browser-seitigen Mechanismus zu schaffen um einige Angriffe auf Webseiten zu verhindern, hauptsächlich XSS...

Nokogiri is great. It will even fix invalid HTML for you, like a browser would (e.g. move block elements out...

makandra dev

# Basic HTML example # Javascript API (notable methods and properties) video = document.querySelector('video') video.play() video.pause() video.load() // Reset to the beginning and...

makandra dev

RubyMine has a HTTP Client that can be useful to test web APIs. Just create a .http scratch file an...