By default, Capistrano truncates server responses and places an ellipsis at the end of lines that are longer than your...

When your JavaScript bundle is so massive that you cannot load it all up front, I would recommend to load...

You know that you can use jQuery's text() to get an element's contents without any tags.

For outputting a given String in HTML, you mostly want to replace line breaks with or tags.

Webpacker uses Babel and Webpack to transpile modern JavaScript down to EcmaScript 5. Depending on what browser a project needs...

Lets say we have a user with a contract whereas contract is a mounted carrierwave file. Now we want to...

hackernoon.com

CSS Flexbox has become extremely popular amongst front-end developers the last couple of years. This isn’t surprising, as...

Form fields can be rendered as noneditable by setting the disabled or the readonly attribute. Be aware of the differences...

makandra dev

When a Rails controller action should handle both HTML and JSON responses, do not use request.xhr? to decide that. Use...

makandra dev
curl.haxx.se

When making requests using curl, no cookies are sent or stored by default. However, you can tell curl to re...

web.archive.org

wrap the text with a span use line-height for the spacing between lines ("margin")

When you print (or print preview) and elements are cut off (e.g. after 1st page, or "randomly") you should check...

By default, browsers will not wrap text at syllable boundaries. Text is wrapped at word boundaries only. This card explains...

github.com

When writing XLSX files, there are gems like rubyXL or axlsx. While they do offer features like formatting or graphs...

makandra dev

An end-to-end test (E2E test) is a script that remote-controls a web browser with tools like Selenium...

When your public-facing application has a longer downtime for server maintenance or long migrations, it's nice to setup...

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

If you are using PDFKit / wkhtmltopdf, you might as well want to use custom fonts in your stylesheets. Usually this...

Download the dictionary from http://www.winedt.org/dict.html, e.g. http://www.winedt.org/dict/de_neu.zip unzip de_neu.zip mkdir ~/Documents/dic iconv -f UTF-16 -t...

reactarmory.com

The linked article shows how to exploit websites that include unsanitized user input in their CSS. Although the article often...

makandra dev
inclusive-components.design

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

select2 is a great jQuery library to make (large) fields more usable. For Bootstrap 3 there is select2-bootstrap-theme...

I needed to make sure that an element is visible and not overshadowed by an element that has a higher...

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