Skip to content

Instantly share code, notes, and snippets.

services:
composer:
environment:
SSH_AUTH_SOCK: /run/host-services/ssh-auth.sock
volumes:
- .:/code
# Share the ssh-agent's socket to be able to install dependencies from private repositories via Composer.
# We are not actually pointing at the socket on a host system, we are pointing at some other special machinery
# in Docker Desktop for macOS that enables specifically the SSH agent forwarding.
# Requires Docker Desktop 2.2+ in case of macOS. Related issue: https://github.com/docker/for-mac/issues/410
@deftbrain
deftbrain / git-change-author-info.sh
Created April 6, 2017 05:48
Replaces old email and name of an author/committer with new ones
git filter-branch --env-filter '
OLD_EMAIL="[email protected]"
CORRECT_NAME="Correct Name"
CORRECT_EMAIL="[email protected]"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
fi
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]