This file contains 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
def hex_to_guid(hex): | |
swapper = lambda A, n=2: [A[i:i + n] for i in range(0, len(A), n)] | |
segments = [hex[0:8], hex[8:12], hex[12:16], hex[16:20], hex[20:]] | |
for i in xrange(3): | |
segments[i] = "".join(list(reversed(swapper(segments[i])))) | |
return "-".join(segments) | |
def guid_to_hex(guid): | |
swapper = lambda A, n=2: [A[i:i + n] for i in range(0, len(A), n)] |
This file contains 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
# Ignores local-generated files for hasicorp vault | |
**/db/sys/policy | |
**/db/sys/accessor | |
**/db/core/cluster | |
**/db/core/wrapping | |
**/db/core/_local* |
This file contains 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 bash | |
# Starts or stops a new vault instance | |
# Example: vault-server.sh start vaults/production ${VAULT_KEY} ${VAULT_TOKEN} | |
# Parameters: | |
# $1 - (start/stop) | |
# $2 - Directory where the vault is located | |
# $3 - Vault Key | |
# $4 - Vault Token |