Pick a random reviewer

Written by  on January 30, 2019

Most teams have a certain code-review-process. But most of the time there is no “round robin”-implementation who will be the reviewer, but the coder itself should select the reviewer. Because of domain-knowledge, etc. And then you her lots of times “I am currently busy. Not me!”

Solution: random and fair selection via bash.

Current version of the script can be found at: https://github.com/marcelpetrick/bashCollection/blob/master/randomReviewer.sh

Inspired by a stack-overflow answer.

find the fattest files of certain type

Written by  on January 30, 2019

creates something like

Fixing ~crappy~ no-good Qt-includes

Written by  on January 29, 2019

How to locate all includes of that style:

with proper

Fired up https://regex101.com/ and set it to PHP and created an expression, which matches:
starting with slash, then a q, then characters, then . then h

(Replace & check has to be done by YOU ;))

Fix whitespace

Written by  on January 24, 2019

Sometimes there is too much whitespace and tabs in my last commit.
In former times I used a VisualStudio-plugin, but this is not helpful there. So I wrote a small script (see on my github) which:
• replaces all tabs with four spaces
• removes all trailing whitespace
• converts line-endings to CRLF

I invoke it on the list of all changes files in my last commit in the git-repo with:

(first part gives you a list of changed files and then feeds it to the script for execution)

Overview of author-activities for the git-repo

Written by  on January 16, 2019

If some ‘sophisiticated’ tool like git-stats is too cumbersome to configure, just do some git-log and shell-magic:

Ok, just noticed that git has something built-in:

from: https://coderwall.com/p/pek-yg/git-statistics-for-repo-per-author – Thanks Marcin Olichwirowicz!