Best practices for REST API design

Posted About 3 years ago by Emanuel.
stackoverflow.blog

A rough guide how to implement a REST API. The discussion here includes some interesting points as well: Timestamps: ISO8601...

Running old ImageMagick versions in a Docker container

Posted About 3 years ago by Michael Leimstädtner.

If your project depends on an old version of ImageMagick that you can no longer install in your system, you...

Parallelize Development Using Git Worktrees

Posted About 3 years ago by Julian.

You can use git worktree to manage multiple working trees attached to the same repository. But why should I use...

WYSIWYG with Action Text

Posted Over 3 years ago by Niklas Hasselmeyer.

Rails 6 includes a WYSIWYG editor, Action Text. It works out of the box quite well, but chances are that...

Git: Parsing large diffs as a human

Posted Over 3 years ago by Michael Leimstädtner.

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

Git diff: Deemphasizing code that was only moved around

Posted Over 3 years ago by Dominik Schöler.

In long diffs, it can become impossible to spot small changes in larger blocks of moved code. This may be...

Missing certificates for rubygems and bundler in Ruby 1.8.7

Posted Over 3 years ago by Emanuel.

Using Ruby 1.8.7 you will not be able to use the maximum versions Rubygems 1.8.30 and Bundler 1.17.3 with https://...

Rails developers: Have better context in Git diffs

Posted Over 3 years ago by Dominik Schöler.
tekin.co.uk

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

Ruby: A short summary of available hooks in Cucumber

Posted Over 3 years ago by Emanuel.

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

Migrate gem tests from Travis CI to Github Actions with gemika

Posted Over 3 years ago by Tobias Kraze.

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

Installing old versions of mysql2 on Ubuntu 20.04+

Posted Over 3 years ago by Tobias Kraze.

On some of our older projects, we use the mysql2 gem. Unfortunately, versions 0.2.x (required for Rails 2.3) and...

Installing Ruby <= 2.3 on Ubuntu 20.04+

Posted Over 3 years ago by Tobias Kraze.

Installing old Rubies (<= 2.3) with a standard rbenv + ruby-build is no longer possible on Ubuntu 20.04. This is because...

PostgreSQL: Importing dumps created with newer versions

Posted Over 3 years ago by Daniel Straßner.

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

Rails: How to restore a postgres dump from the past

Posted Over 3 years ago by Emanuel.

It sometimes happen that a database dump, that would want to insert into your development database, does not match the...

Git: Search for text in all branches

Posted Over 3 years ago by Henning Koch.

To find a version containing the regular expression foo in the history of any branch: git grep foo $(git rev...

Git: How to stage hunks with a single key press

Posted Over 3 years ago by Emanuel.

In interactive commands, Git allows the user to provide one-letter input with a single key without hitting enter (docs...

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

Select2 alternatives without jQuery

Posted Almost 4 years ago by Henning Koch.

Select2 is a fantastic library for advanced dropdown boxes, but it depends on jQuery. Alternatives Tom Select

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

How to use git fixup

Posted Almost 4 years ago by Emanuel.

Using git fixup helps you to speed up appending changes further back in the git history of your feature branch...

Git: How to add changes matching a regular expression

Posted About 4 years ago by Arne Hartherz.

When you have many changes, and you want to spread them across different commits, here is a way to stage...

Five years of "Today I Learned" from Josh Branchaud

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

How to use Simplecov to find untested code in a Rails project with RSpec and Cucumber

Posted About 4 years ago.

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

Colorful output for several linux command line tools: grc

Posted About 4 years ago.
github.com

Because colors improve readability so much. On Ubuntu 18.04 you can install it with sudo apt install grc