makandra dev

I just finished migrating a project from the Asset Pipeline to Webpacker, this is what my diff to master looks...

The Truemail gem (not to be confused with truemail.io) allows validating email addresses, e.g. when users enter them into a...

TinyMCE is a WYSIWYG editor which is quite customizable. Add a custom button to the tinyMCE toolbar and tell tinyMCE...

thoughtbot.com

The linked blog post contains some background information about the alt attribute and the figure / figcaption element. It is interesting...

tekin.co.uk

Git diffs show the surrounding contexts for diff hunks. It does so by applying regular expressions to find the beginning...

Here is a short summary of Cucumber hooks in Ruby taken from https://github.com/cucumber/cucumber-ruby. Note that the BeforeStep is...

web.archive.org

There is a common view that extracting text from a PDF document should not be too difficult. After all, the...

simple-form-bootstrap.plataformatec.com.br

Good reference how to build bootstrap forms with simple_form.

After a recent Ubuntu update I didn't see the main menu bar of the RubyMine IDE (File | Edit | View...

If you're about to handle X509 certificates and don't want to remember/google a handful of openssl commands you...

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

Nokogiri is great. It will even fix invalid HTML for you, like a browser would (e.g. move block elements out...

makandra dev

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

makandra dev

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

makandra dev
select2.org

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

Speaker today is Henning Koch, Head of Development at makandra. This talk will be in German with English slides.

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

Simplecov is a code coverage tool. This helps you to find out which parts of your application are not tested...

When we write a form with date fields, we often use graphical data picker like Rome to get a consistent...

Turns out, Cucumber::MultilineArgument::DataTable#diff! caches some stuff. Code of the following form will not work as intended:

By default, Devise redirects to a sign-in form when accessing a route that requires authentication. If for some reason...

makandra dev

If you need to test some HTML, e.g. an embed code, you can use RubyMine's "scratch files":

makandra dev

Or: How to avoid and refactor spaghetti code Please note that I tried to keep the examples small. The effects...