Let's say you have a gem which has the following module: # within the imaginary super gem module SuperClient

makandra dev

Option 1: JSON dump In config/webpack/environment.js you can get inspect environment which includes all webpack config options set for the...

As a web developer, you know Google Analytics (GA). Probably you've dropped the GA snippet into more than one...

makandra dev

For webpages to load fast it's recommended to optimize images. Ideally an image's file size should be as...

If you want to fill in textareas with multiple lines of text (containing line breaks / new lines) you can use...

To make a local copy of an S3 bucket, I use the s3cmd command line tool. Configure access keys:

Rails defines a #truncate helper as well as a method String#truncate. = truncate("my string", length: 5) = "my string".truncate...

makandra dev
litmus.com

The 90s are calling: they want their tables back. Unfortunately, you need them all for laying out your HTML emails...

caniuse.com

Since late 2015, all major browsers (still excluding Firefox) support pointing device media queries. These can be used to distinguish...

The method cookies is defined in the ActionController and should never be overwritten. Bad example class StaticPagesController < ApplicationController

rspec.info

RSpec let's you chain a matcher with .or. The expectation will then pass if at least one matcher matches...

developer.mozilla.org

Browsers' printing methods usually don't print background colors. In most cases this is the desired behavior, because you don...

caniuse.com

There is a kinda secret, yet well supported CSS feature called currentColor. It's like a special CSS variable that...

guides.rubyonrails.org

TL;DR I18n keys ending with _html are automatically marked as HTML-safe when translating with t('.your_key_html...

When your application is running on a multi-server setup, application logs are stored per server (unless you choose a...

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.

Sometimes, the IRB prints a warning during boot: irb: warn: can't alias source from irb_source. Explanation

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

jsfiddle.net

When you need test images, instead of using services like lorempixel or placehold.it you may generate test images yourself.

Boot partitions from installations prior to the 16.04 era are terribly small. When you install updates and encounter errors due...

When you find yourself constantly ignoring a RubyMine warning, you can simple disable that warning and de-clutter your editor...

You might have some trouble running a Rails LTS 2 app with MySQL 5.7. If you don't want to...

On your local system that only hosts non-critical development data and only you have access to, you can store...