Chrome DevTools: Treasure (Overview)

Posted Over 1 year ago by Julian.

tl;dr The Chrome DevTools are a neat collection of tools for the daily work as a web developer. If...

Sass: get rid of deprecation warnings in dependencies

Posted Over 1 year ago by Daniel Straßner.

TLDR: sass >= 1.35.0 has the option quietDeps to silence deprecation warnings from dependencies. quietDeps: If true, the compiler must not...

GitLab: Git alias for creating a merge request on push

Posted Over 1 year ago by Martin Schaflitzl.

Git allows you to set push options when pushing a branch to the remote. You can use this to build...

Debug flaky tests with an Unpoly observeDelay

Posted Over 1 year ago by Niklas Hasselmeyer.

Unpoly's [up-observe], [up-autosubmit] and [up-validate] as well as their programmatic variants up.observe() and up.autosubmit...

Git: Restore

Posted Over 1 year ago by Julian.

tl;dr git checkout is the swiss army of git commands. If you prefer a semantically more meaningful command for...

How to fix "Exit with code 1 due to network error: ProtocolUnknownError" with wkhtmltopdf

Posted Over 1 year ago by Tobias Kraze.

New versions of wkhtmltopdf dissallow file:// URLs by default. You can allow them by passing --enable-local-file-access.

Git commands to discard local changes

Posted Over 1 year ago by Felix Eschey.

You have uncommited changes (you can always check by using git status), which you want to discard.

RubyMine: Find and Replace with Regex (Capture Groups and Backreferences)

Posted Over 1 year ago by Julian.

tl;dr In RubyMine you can use find and replace with capture groups (.*?) and backreferences $1 (if you have several...

SEO: The subtle differences of robots.txt disallow vs meta robots no-index

Posted Over 1 year ago by Dominik Schöler.
workingdraft.de

The robots.txt file and HTML tag can be used to control the behavior of search engine crawlers. Both have different...

Prefer using Dir.mktmpdir when dealing with temporary directories in Ruby

Posted Over 1 year ago by Emanuel.

Ruby's standard library includes a class for creating temporary directories. Similar to Tempfile it creates a unique directory name...

Ruby and Rails: Debugging a Memory Leak

Posted Over 1 year ago by Dominik Schöler.

A memory leak is an unintentional, uncontrolled, and unending increase in memory usage. No matter how small, eventually, a leak...

JSON APIs: Default design for common features

Posted Over 1 year ago by Niklas Hä..

When you build a JSON API you need to come up with a style to represent attributes, pagination, errors or...

Converting SVG to other vector formats without Inkscape

Posted Over 1 year ago by Arne Hartherz.

If you need to convert an SVG source to PS or EPS, the most common suggestion on the interwebs is...

Web development: Accepting a self-signed certificate in Google Chrome

Posted Over 1 year ago by Dominik Schöler.

Working with a self-signed certificate is much easier, when the browser accepts it. Google Chrome Warnings from chrome might...

Git: removing feature branches on merge

Posted Over 1 year ago by Dominik Schöler.

When working with feature branches, stale branches pile up over time. It's best to remove them right after merge...

Generating and streaming ZIP archives on the fly

Posted Over 1 year ago by Arne Hartherz.

When your Rails application offers downloading a bunch of files as ZIP archive, you basically have two options:

Rails: Fixing the memory leak / performance issues in prepend_view_path

Posted Over 1 year ago by Dominik Schöler.

Recently we detected a memory leak in one of our applications. Hunting it down, we found that the memory leak...

Reading the Rails session hash from a Rack middleware

Posted Over 1 year ago by Henning Koch.

To read the Rails session from a Rack middleware, use env['rack.session']. It's an ActionDispatch::Request::Session object.

Fix: esbuild assets are missing after capistrano deploy

Posted Almost 2 years ago by Tobias Kraze.

Issue: You have an app using jsbundling-rails and esbuild. After deploy, the assets built by esbuild are missing in...

JavaScript: Testing whether the browser is online or offline

Posted Almost 2 years ago by Henning Koch.

You can use the code below to check whether the browser can make connections to the current site: await isOnline...

Rails: Default HTTP status codes when redirecting

Posted Almost 2 years ago by Henning Koch.

When redirecting you should take care to use the right HTTP status code. From controllers When redirecting from a controller...

Show a JS fiddle in fullscreen

Posted Almost 2 years ago by Emanuel.

If you have a JS fiddle, you can open it in fullscreen by appending /show to the URL. Example: https://...

Capybara: Most okayest helper to download and inspect files

Posted Almost 2 years ago by Henning Koch.

Testing file download links in an end-to-end test can be painful, especially with Selenium. The attached download_helpers.rb provides...

Getting different results working with SVG files and ImageMagick

Posted About 2 years ago by Kim Klotz.

When you are working with SVG files and ImageMagick you can get different results on different machines depending on which...