Verifying my cryptographic key: openpgp4fpr:ee2664dd38f53ba6849e99b7757446333d3ec29a
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
func initialiseLogging() logr.Logger { | |
// Setup structured logging to match Cloud Operations expectations, as much as possible | |
zerolog.TimestampFieldName = "time" | |
zerolog.TimeFieldFormat = time.RFC3339 | |
zerolog.LevelFieldName = "severity" | |
zerolog.LevelTraceValue = "DEFAULT" | |
zerolog.LevelDebugValue = "DEBUG" | |
zerolog.LevelInfoValue = "INFO" | |
zerolog.LevelWarnValue = "WARNING" | |
zerolog.LevelErrorValue = "ERROR" |
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
#!/bin/sh | |
# | |
# Verify GCP service account default authentication status on VM | |
info() | |
{ | |
echo "$0: INFO: $*" >&2 | |
} | |
error() |
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
- id: talisman-commit | |
name: talisman | |
entry: talisman --githook pre-commit | |
stages: [commit] | |
# talisman currently discovers files by itself and does not take them on the cli | |
pass_filenames: false | |
types: [text] | |
language: system | |
- id: talisman-push |
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
resource "vault_policy" "admin" { | |
name = "admin" | |
policy = <<EOP | |
# Manage auth methods broadly across Vault | |
path "auth/*" | |
{ | |
capabilities = ["create", "read", "update", "delete", "list", "sudo"] | |
} | |
# Create, update, and delete auth methods |
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
# Use the virtualenv defined for this project | |
layout virtualenvwrapper VENV_NAME | |
unset PS1 |
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
#-*- mode: sh -*- | |
# Setup history control | |
HISTCONTROL=ignoreboth | |
shopt -s histappend | |
HISTSIZE=1000 | |
HISTFILESIZE=2000 | |
shopt -s checkwinsize | |
# Default prompt is user@host | |
PS1='\[\033[0;32m\]\u@\h\[\033[0m\]:\[\033[0;31m\]\w\[\033[00m\]\$ ' |
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
// Keep jsrsasign libs assume they are working in a browser; fake these out.. | |
var navigator = { | |
appName: "Cloud IoT test script" | |
}; | |
var window = {}; | |
// Make sure that jsrsasign is in scope | |
eval(postman.getEnvironmentVariable('jsrsasign')); | |
// Cloud IoT HTTP URL is of form: https://cloudiotdevice.googleapis.com/v1/projects/{project-id}/locations/{location}}/registries/{registry}/devices/{device-id}/... |
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
# Configure bash shell for chromebook | |
HISTCONTROL=ignoreboth | |
shopt -s histappend | |
HISTSIZE=1000 | |
HISTFILESIZE=2000 | |
shopt -s checkwinsize | |
_MEMES_IP=$(ip addr show dev arc0 | gawk '{ if (match($0, /inet ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/, m)) print m[1]}') | |
PS1='\[\033[01;32m\]\u@${_MEMES_IP}\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' | |
[ -f ~/bin/git-prompt.sh ] && . ~/bin/git-prompt.sh | |
[ -f ~/.bash_memes ] && . ~/.bash_memes |
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
var encodedURL = encodeURIComponent(postman.getGlobalVariable("baseURL")).toLowerCase(); | |
var expiration = Math.ceil((Date.now() / 1000) + 3600); | |
var realKey = postman.getGlobalVariable("sharedAccessKey"); | |
var token = encodedURL + '\n' + expiration; | |
var sig = CryptoJS.HmacSHA256(token, realKey); | |
var encodedSig = encodeURIComponent(CryptoJS.enc.Base64.stringify(sig)); | |
var authToken = "SharedAccessSignature sr=" + encodedURL + "&sig=" + encodedSig + "&se=" + expiration + "&skn=" + postman.getGlobalVariable("sharedAccessKeyName"); | |
postman.setGlobalVariable("authToken", authToken); |
NewerOlder