tekin.co.uk

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

github.com

Scroll and touch event listeners tend to be computationally expensive as they are triggered very often. Every time the event...

We currently test most of our gems on Travis CI, but want to migrate those tests to Github Actions. This...

If you're experiencing problems with your Google Chrome installation after an update, it might help downgrading Chrome to check...

When loading a database dump created with pg_dump into your database, you might run into an error like

.desktop files define launchers for applications installed on your machine. They specify the command that will be executed when launched...

The sidekiq-rate-limiter gem allows rate-limiting Sidekiq jobs and works like a charm. However, it needs to be...

ActiveRecord provides the ids method to pluck ids from a scope, but what if you need to pluck Global IDs...

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

A flat folder structure can be cool if you have only a few folders but can be painful for huge...

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

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

If you want to prevent that two processes run some code at the same time you can use the gem...

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

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

postgresql.org

TL;DR PostgreSQL handles Rails 4+ text and string columns the same. Some libraries may still reflect on the column...

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

github.com

An unresponsive service can be worse than a down one. It can tie up your entire system if not handled...

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

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

tl;dr Don't forget require 'English' if you use a named global such as $LAST_MATCH_INFO. Otherwise this...

betterspecs.org

betterspecs.org is a documentation on how to write better RSpec tests. Note that there are also other approaches like The...

makandra dev

With Rspec you can mock objects or functions, for example like this: expect(my_object).to receive(:my_function).and...