georgemauer.net

If your application exports CSV, be advised that Excel and other spreadsheet applications treat certain cells (those starting with =, +, - or...

When attempting to update RubyGems, depending on updates your previously performed, you might run into an error ERROR: While executing...

We're usually running Ubuntu LTS versions. Sometimes newer hardware requires packages from more recent Ubuntu releases that only come...

A common pattern in Ruby is to to require all files in a specific diretory, using something like Dir.glob(Rails.root.join...

Checking if a JavaScript value is of a given type can be very confusing: There are two operators typeof and...

If you already selected an element and want to get its parent, you can call find(:xpath, '..') on it.

If you use awesome and make a Slack call, you'll constantly have an overlay window pop up taking over...

You are not using javascript tests The file is served from a public folder (not via controller) Problem description...

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

Browsers support different types of redirects. Be very careful with these status codes: 301 Moved Permanently 308 Permanent Redirect

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

Let's say you have a folder images and want to to move all files in there to a new...

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.

You need to set the :inverse_of option manually for relations that have an association to a polymorphic model. Otherwise...

When you want to group rails models of a logical context, namespaces are your friend. However, if you have a...

RSpec allows defining methods inside describe/context blocks which will only exist inside them. However, classes (or any constants, for that...

askubuntu.com

While the hardware mute button of my Lenovo x230 worked on Ubuntu 14.04 out of the box, it does not...

Let's say you have a form that you render a few times but you would like to customize your...

github.com

FactoryBot allows a :class option to its factory definitions, to set the class to construct. However, this option is not...

After loading a staging dump into development, you might get an ActiveRecord::EnvironmentMismatchError when trying to replace the database (like...

forums.linuxmint.com

On my Ubuntu MATE machine, switching applications with ALT + TAB was impossible, because it took nearly 2 seconds. The culprit...