This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from django import template | |
| from django.contrib.staticfiles.finders import find as find_static_file | |
| import base64 | |
| register = template.Library() | |
| def get_file_data(file_path: str) -> bytes: | |
| """ | |
| @param file_path: Path of the file to get the data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Script to use custom ssh keys for various git repositories | |
| # Run without arguments to get usage info. | |
| # | |
| # How it works: | |
| # When used with SSH, git sends the path to the repository in the SSH command. | |
| # @see: https://github.com/git/git/blob/e870325/connect.c#L1268 | |
| # We extract this info and search for a key with the name. | |
| # Based on the source, this seems to be used format since v2.0 at least. | |
| # @see: https://github.com/git/git/commit/a2036d7 |