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
| #!/usr/bin/env python | |
| # with help and inspiration from | |
| # * ASN1_generate_nconf(3) (specifically the SubjectPublicKeyInfo structure) | |
| # * http://www.sysmic.org/dotclear/index.php?post/2010/03/24/Convert-keys-betweens-GnuPG%2C-OpenSsh-and-OpenSSL | |
| # * http://blog.oddbit.com/2011/05/converting-openssh-public-keys.html | |
| import sys | |
| import base64 | |
| import struct |
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
| git_branch() | |
| { | |
| # Check if we are on an untrached branch | |
| ISUNTRACKED=$(git branch 2>/dev/null | grep '* (no branch)' | wc -l) | |
| # Checks the branch name | |
| BRANCH=$(git branch 2>/dev/null | grep '*' | awk '{ print $2 }') | |
| if [ "x$BRANCH" != "x" ]; then | |
| if [ "x$ISUNTRACKED" != "x0" ]; then | |
| echo -ne ':\033[31;1mUNTRACKED('$(git log --oneline -1 | awk '{ print $1 }')')\033[0m' |