Recent Notes

@Rollback annotation in test does not rollback anything

use @Transactional annotation in test

Jekyll: Build and run on default port

bundle exec jekyll serve --livereload

Git: Change author of pushed commits

git commit --amend --author="new-author-name new-author@email.com" --no-edit

Git: Change file permissions

git update-index --chmod=+x script.sh

Failed to pull image from docker repository

[setup permissions](https://everythingtech.dev/2022/09/how-to-fix-docker-unauthorized-from-pulling-from-github-private-packages-ghcr-io)

Failed to run testcontainers in windows

TESTCONTAINERS_HOST_OVERRIDE=host.docker.internal

How Docker Compose resolves environment variables

[link](https://docs.docker.com/compose/environment-variables/envvars-precedence/)

Git: Change editor

git config --global core.editor "vim"

How to debug javax.xml factories

-Djaxp.debug=true

Git: Know your remote

git config --get remote.origin.url

Bash: Ignore error of particular command

some_command || true

Not able to publish docker image

sudo usermod -aG docker $USER

Git: Recent branches

git reflog show --pretty=format:'%gs ~ %gd' --date=relative | grep 'checkout:' | grep -oE '[^ ]+ ~ .*' | awk -F~ '!seen[$1]++' | head -n 10 | awk -F' ~ HEAD@{' '{printf(" %s\n", $1)}'

Docker: clean up

docker system prune -f --filter "until=24h"

Docker: Setup to run without sudo

sudo usermod -aG docker $USER