makandra dev

This is a presentation from 2019-01-21. Summary We want to move away from jQuery in future projects

makandra dev

Suggested Workflow Set the ruby version in .ruby-version to 2.3.5, then perform these steps one by one, fixing errors...

Rails ships with two separate build pipelines: Sprockets ("asset pipeline") and Webpacker. Webpacker has many more moving parts, but allows...

codepen.io

Occasionally, your designer will hand you designs where elements break the layout's horizontal container width, like navigation buttons of...

Accessing pseudo elements via JavaScript or jQuery is often painful/impossible. However, accessing their styles is fairly simple. Using getComputedStyle

relishapp.com

When you are using lambdas in RSpec to assert certain changes of a call, you know this syntax: expect { playlist.destroy...

makandra dev

Ubuntu has decided to disable PDF processing because ImageMagick and the underlying Ghostscript had several security issues. When your Ghostscript...

In this example we assume that not only the storage gem changes but also the file structure on disc.

github.com

Masonry is a famous library to dynamically arrange a grid of items that have different aspect ratio, like horizontal and...

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

makandra dev
litmus.com

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

stackoverflow.com

Ruby has this handy block shortcut map(&:to_i) for map { |x| x.to_i }. However, it is limited to argument...

caniuse.com

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

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

makandracards.com

In medium-sized to large Rails applications, asset compilation can take several minutes. In order to speed up deployment, asset...

caniuse.com

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

makandra dev
rubydoc.info

CarrierWave comes with some RSpec matchers which will make testing more comfortable. Let's say you have an Uploader like...

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 have string contents (e.g. a generated binary stream, or data from a remote source) that you want to...

If you want to make a screenshot of a website that works well in print or on a high-DPI...