def unique_name_from_repo(self, repo_url):
        """Generate a unique name for a git repo url

        e.g. minrk-binder-example-abc123
        from https://github.com/minrk/binder-example.git
        """
        # start with url path
        if "://" not in repo_url and _ssh_repo_pat.match(repo_url):
            # ssh url
            path = repo_url.split(":", 1)[1]
        else:
            path = urlparse(repo_url).path

        prefix = path.strip("/").replace("/", "-").lower()

        if prefix.endswith(".git"):
            # strip trailing .git
            prefix = prefix[:-4]

        if len(prefix) > 32:
            # if it's long, truncate
            prefix = f"{prefix[:15]}-{prefix[-15:]}"

        # add a random suffix to avoid collisions for users on the same image
        return "{}-{}".format(
            prefix, "".join(random.choices(SUFFIX_CHARS, k=SUFFIX_LENGTH))
        )
Generate a unique name for a git repo url

        e.g. minrk-binder-example-abc123
        from https://github.com/minrk/binder-example.git
        
binderhub/launcher.py