Converting SVG to other vector formats without Inkscape

Posted Over 1 year ago by Arne Hartherz.

If you need to convert an SVG source to PS or EPS, the most common suggestion on the interwebs is...

Generating and streaming ZIP archives on the fly

Posted Over 1 year ago by Arne Hartherz.

When your Rails application offers downloading a bunch of files as ZIP archive, you basically have two options:

CSS: The inset CSS shorthand

Posted Almost 2 years ago by Emanuel.
developer.mozilla.org

The inset CSS property is a shorthand that corresponds to the top, right, bottom, and/or left properties. It has the...

Debug file system access in a Rails application

Posted Almost 2 years ago by Tobias Kraze.

It might sometimes be useful to check whether your Rails application accesses the file system unnecessarily, for example if your...

Getting different results working with SVG files and ImageMagick

Posted About 2 years ago by Kim Klotz.

When you are working with SVG files and ImageMagick you can get different results on different machines depending on which...

Generating an Entity Relationship Diagram for your Rails application

Posted About 2 years ago by Arne Hartherz.

This card explains how to generate an entity relationship diagram for your Rails application. We also show how to limit...

How to add esbuild to the rails asset pipeline

Posted About 2 years ago.

This are the steps I needed to do to add esbuild to an application that used the vanilla rails asset...

Carrierwave: How to attach files in tests

Posted Over 2 years ago by Emanuel.

Attaching files to a field that is handled by Carrierwave uploaders (or maybe any other attachment solution for Rails) in...

Defensive CSS

Posted Over 2 years ago by Emanuel.
ishadeed.com

Table Of Contents Flexbox wrapping Spacing Long content Prevent an image from being stretched or compressed Lock scroll chaining

ImageMagick: Converting SVG to raster image formats like PNG or JPEG

Posted Over 2 years ago by Bruno Sedler.

ImageMagick can convert SVGs to raster image formats. Example for PNG: convert input.svg output.png If the SVG has a...

Using feature flags to stabilize flaky E2E tests

Posted Over 2 years ago by Henning Koch.

A flaky test is a test that is often green, but sometimes red. It may only fail on some PCs...

Using multiple MySQL versions on the same linux machine using docker

Posted Over 2 years ago by Daniel Straßner.

We had a card that described how to install multiple mysql versions using mysql-sandbox. Nowadays with the wide adoption...

CSS: How to force background images to scale to the container, ignoring aspect ratio

Posted Over 2 years ago by Arne Hartherz.

You can scale background images in CSS to the container size using background-size (Demo). Commonly, we use contain or...

Setting SASS variables as value for CSS custom properties

Posted Over 2 years ago by Dominic Beger.

When using custom properties in your stylesheets, you may want to set a specific property value to an existing variable...

How to checkout submodules in Gitlab CI

Posted Almost 3 years ago by Emanuel.

Accessing other repositories in Gitlab CI is not straight forward, since the access rights of the current pipeline might not...

RubyMine / IntelliJ: How to increase UI and fonts for presentations

Posted Almost 3 years ago by Arne Hartherz.

When giving a presentation where you do some coding, the font size you usually use is probably a bit too...

Carrierwave: Using a nested directory structure for file system performance

Posted Almost 3 years ago by Arne Hartherz.

When storing files for lots of records in the server's file system, Carrierwave's default store_dir approach may...

Carrierwave: How to remove container directories when deleting a record

Posted Almost 3 years ago by Arne Hartherz.

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

When does Webpacker compile?

Posted Almost 3 years ago by Henning Koch.

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

Delivering Carrierwave attachments to authorized users only

Posted About 3 years ago by Dominic Beger.

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

Ruby: How to convert hex color codes to rgb or rgba

Posted About 3 years ago by Arne Hartherz.

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

Capybara: Preventing server errors from failing your test

Posted About 3 years ago by Henning Koch.

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

Webmock < 3.12.1 cannot handle IPv6 addresses correctly

Posted About 3 years ago.

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: Default Configuration and Suggested Changes

Posted About 3 years ago by Dominik Schöler.

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