You are not using javascript tests The file is served from a public folder (not via controller) Problem description...

Slides for Henning's talk on Sep 21st 2017. Understanding sync vs. async control flow Talking to synchronous (or "blocking...

Let's say you have a folder images and want to to move all files in there to a new...

makandra dev
inclusive-components.design

Hack to implement an inverted "night mode" theme with a few lines of CSS. Colors in images are preserved.

If you want to ssh into your vagrant box without switching into the project directory and typing vagrant ssh, you...

Sometimes you add Paperclip image styles, sometimes you remove some. In order to only keep the files you actually need...

ImageMagick can automatically crop surrounding transparent pixels from an image: convert input.png -trim +repage output.png

github.com

When storing a file with Carrierwave, it is always cached prior to actually storing it (to support form roundtrips).

This is useful if, for example, you want to use a background-image that has to scale with the width...

Dump this method into your Ruby console to quickly print data in columns. This is helpful for e.g. comparing attributes...

When you load a dump for development, records may reference images that are not available on your machine.

Some pseudo-elements need to be addressed with vendor prefixes. E.g. ::selection is not supported by Firefox, you need to...

ImageMagick has a command line tool called identify which can read image metadata: >identify -verbose DSC00136.JPG Image: DSC00136.JPG Format: JPEG...

github.com

Barby is a great Ruby gem to generate barcodes of all different sorts. It includes support for QR codes via...

Using the dialog command you can launch ASCII-art dialogs from your shell scripts. Check out man dialog for a...

smashingmagazine.com

A comprehensive introduction to sending HTML emails. Intro: HTML email: Two words that, when combined, brings tears to a developer...

If your Carrierwave uploader dynamically generates the filename (e.g. by incorporating a user's name), you must call model.save! after...

Plot graphs in Ruby WebGraphviz renders in your browser via JavaScript (to store the rendered graph, extract the SVG using...

Like you know from "How to tell ActiveRecord how to preload associations (either JOINs or separate queries)", you can tell...

This method will remove automatically installed packages that no other packages depend on any more. This, of course...

github.com

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

SVG is an acronym for "scalable vector graphics". SVGs should be used whenever an image can be described with vector...

icomoon.io

Icomoon.io offers a free app to build custom icon webfonts. It offers downloads as webfont set (.eot, .ttf, .woff, .woff2...

1. Sometimes you have search entries in the autocomplete of the address bar, which are higher weighted than your bookmarks...