Skip to content

Instantly share code, notes, and snippets.

@TechupBusiness
TechupBusiness / git-https-set-and-revert-for-host.sh
Last active April 21, 2020 17:24
Set git to https and revert it for a specific host globally
# Remove --global to set it for the current project
# Set https instead of git globally for specific host
git config --global url."https://mydomain.com/".insteadOf git@gitlab.com:
# Revert and set git instead of https globally for specific host
git config --global --unset-all url.https://mydomain.com/.insteadof
# Check by using
git config -l

Keybase proof

I hereby claim:

  • I am techupbusiness on github.
  • I am techup (https://keybase.io/techup) on keybase.
  • I have a public key ASCHJsglgiTWqBEs_FDCfNcQVE_sqck94ydNhQFdEBdlRwo

To claim this, I am signing this object:

@TechupBusiness
TechupBusiness / create_docker_compose_basic_auth_string_for_traefik.sh
Last active July 31, 2023 13:52
Generator to create basic authentication string for traefik (docker-compose.yml and .env)
#!/bin/bash
SUDO=''
if (( $EUID != 0 )); then SUDO='sudo'; fi
echo "Basic auth for traefik >= v1.7"
read -p "User: " USER
read -p "Password: " PW
# Checks if htpasswd is available or install it otherwise