Variable fonts for web developers

Posted Over 3 years ago by Michael Leimstädtner.

This card is mainly an explanation how variable fonts work in CSS, not necessarily a recommendation to actually use them...

How to configure file watchers in RubyMine

Posted Over 3 years ago by Michael Leimstädtner.

You need to install the official plugin, it is not bundled with RubyMine by default. Example: Setup a watcher...

Convert curl commands to ruby code

Posted Over 3 years ago by Jakob Scholz.

curl-to-ruby is a handy tool that converts your curl command to ruby code that uses the Net::HTTP...

VCR and the webdrivers gem

Posted Over 3 years ago by Niklas Hä..

If you're using the webdrivers gem and VCR together, depending on your configuration, VCR will yell at you regulary...

How to include Sidekiq job IDs in Rails logs

Posted Over 3 years ago by Arne Hartherz.

When logging in Rails, you can use the log_tags configuration option to add extra information to each line, like...

Ruby: How to determine the absolute path relative to a file

Posted Over 3 years ago by Emanuel.

If you want to get the path of a file relative to another, you can use the expand_path method...

CSS variables aka CSS Custom Properties

Posted Over 3 years ago by Dominik Schöler.

CSS variables are very different from preprocessor variables. While preprocessors use variables to compile a static piece of CSS, CSS...

How does Sentry group exceptions?

Posted Over 3 years ago by Tobias Kraze.

When you use Sentry to monitor exceptions, an important feature is Sentry's error grouping mechanism. This will aggregate similar...

Clean your Rails routes: grouping

Posted Over 3 years ago by Florian Leinsinger.
medium.com

In Ruby on Rails, all the routes of a given application can be found within the config/routes.rb file.

Rails: How to get the ordered list of used middlewares

Posted Over 3 years ago by Emanuel.

Rails middlewares are small code pieces that wrap requests to the application. The first middleware gets passed the request, invokes...

How to check if a file is a human readable text file

Posted Over 3 years ago by Jakob Scholz.

Ruby's File class has a handy method binary? which checks whether a file is a binary file. This method...

How to migrate CoffeeScript files from Sprockets to Webpack(er)

Posted Over 3 years ago by Michael Leimstädtner.

If you migrate a Rails application from Sprockets to Webpack(er), you can either transpile your CoffeeScript files to JavaScript...

Vortrag: Content Security Policy: Eine Einführung

Posted Over 3 years ago by Tobias Kraze.

CSP hat zum Ziel einen Browser-seitigen Mechanismus zu schaffen um einige Angriffe auf Webseiten zu verhindern, hauptsächlich XSS...

Automatically validating dependency licenses with LicenseFinder

Posted Almost 4 years ago by Dominik Schöler.

"Open-source software (OSS) is great. Anyone can use virtually any open-source code in their projects." Well, it depends...

The HTML5 video element

Posted Almost 4 years ago by Dominik Schöler.

# Basic HTML example # Javascript API (notable methods and properties) video = document.querySelector('video') video.play() video.pause() video.load() // Reset to the beginning and...

HTTP Client in RubyMine

Posted Almost 4 years ago by Martin Schaflitzl.

RubyMine has a HTTP Client that can be useful to test web APIs. Just create a .http scratch file an...

How to use Active Job to decouple your background processing from a gem

Posted Almost 4 years ago.

In a web application you sometimes have tasks that can not be processed during a request but need to go...

Howto: Select2 with AJAX

Posted Almost 4 years ago by Florian Leinsinger.
select2.org

Select2 comes with AJAX support built in, using jQuery's AJAX methods. ... For remote data sources only, Select2 does not...

Testing for XSS in Markdown Fields

Posted Almost 4 years ago.
github.com

If you render markdown from user input, an attacker might be able to use this to inject javascript code into...

Legacy CarrierWave: How to generate versions with different file extensions

Posted Almost 4 years ago by Michael Leimstädtner.

We use CarrierWave in many of our projects to store and serve files of various formats - mostly images. A common...

Five years of "Today I Learned" from Josh Branchaud

Posted Almost 4 years ago by Michael Leimstädtner.
github.com

The linked GitHub repository is a bit like our "dev" cards deck, but groomed from a single person (Josh Branchaud...

Rails: Concurrent requests in development and tests

Posted About 4 years ago by Emanuel.

With puma you can have concurrent requests. There are two concepts on how Puma can handle two incoming requests: Workers...

Test-Driven Development with integration and unit tests: a pragmatic approach

Posted About 4 years ago by Dominik Schöler.

Test-Driven Development (TDD) in its most dogmatic form (red-green-refactor in micro-iterations) can be tedious. It does...

Bundler in deploy mode shares gems between patch-level Ruby versions

Posted About 4 years ago by Michael Leimstädtner.

A recent patch level Ruby update caused troubles to some of us as applications started to complain about incompatible gem...