Skip to content

Instantly share code, notes, and snippets.

@unceus
unceus / gist.md
Created January 25, 2022 00:29 — forked from esgn/gist.md
Handle multiple git identities using .gitconfig files

How to use .gitconfig files to handle multiple identities / git providers (github, gitlab, ...)

In the user home, define a parent .gitconfig file for your main account (eg: work account)

[user]
        name = John Doe
        email = john.doe@work.com
[credential]
        helper = store --file /home/johndoe/.git-credentials
@unceus
unceus / remove-docker-containers.sh
Created July 18, 2017 18:55
remove stopped docker containers
for item in $(docker ps -aq); do
docker stop $item
docker rm $item
done
for item in $(docker images --filter dangling=true -q); do
docker rmi $item
done
@unceus
unceus / fail2ban.conf
Created July 3, 2017 17:19
fail2ban fail2ban.conf (monitor fail2ban log file)
# Fail2Ban configuration file
#
# Author: Tom Hendrikx, minor modifications by Amir Caspi
# See http://whyscream.net/wiki/index.php/Fail2ban_monitoring_Fail2ban
#
# $Revision: 1 $
#
[Definition]