When deleting a record in your Rails app, Carrierwave automatically takes care of removing all associated files. However, the file...

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

When you have a hex color code, you can easily convert it into its RGB values using plain Ruby.

When your Rails application server raises error, Capybara will fail your test when it clears the session after the last...

We had the issue, that a VCR spec failed, after updating CarrierWave from version 0.11.0 to 1.3.2. In this version...

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

If your project depends on an old version of ImageMagick that you can no longer install in your system, you...

getbootstrap.com

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

makandra dev

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

In long diffs, it can become impossible to spot small changes in larger blocks of moved code. This may be...

makandra dev

Feature Queries (Edge 12+): Similar to @media queries, @supports blocks can be scoped to browsers that support a given declaration...

thoughtbot.com

While both the alt attribute and the figcaption element provide a way to describe images, the way we write for...

Generated Photos produces AI-generated face images. This is useful for UI mockups where you don't want to show...

CSS variables are very different from preprocessor variables. While preprocessors use variables to compile a static piece of CSS, CSS...

A flat folder structure can be cool if you have only a few folders but can be painful for huge...

makandra dev

If you have a Ruby Pathname, you can use the method :/ to append filepaths to it. With this method, Ruby...

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

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

If you render markdown from user input, an attacker might be able to use this to inject javascript code into...

We use CarrierWave in many of our projects to store and serve files of various formats - mostly images. A common...

Embedding videos on a website is very easy, add a tag to your source code and it just works...

github.com

Because colors improve readability so much. On Ubuntu 18.04 you can install it with sudo apt install grc

developer.mozilla.org

Heads up: transparent is not a real color, but black with 0% opacity. In transparent gradients, this adds some gray...