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
| locals { | |
| oidc_discovery_url = "https://kube-api.example.com:6443" # PLACEHOLDER | |
| } | |
| resource "vault_jwt_auth_backend" "kube_segment_1" { | |
| description = "JWT auth backend for Kubernetes Pods in logical Segment 1" | |
| path = "kube/segment-1" | |
| oidc_discovery_url = local.oidc_discovery_url # Vault makes a GET request to `${local.oidc_discovery_url}/.well-known/openid-configuration` | |
| bound_issuer = local.oidc_discovery_url | |
| } |
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
| resource "vault_jwt_auth_backend" "tfe" { | |
| type = "jwt" | |
| path = "tfe" | |
| oidc_discovery_url = "https://tfe.example.com" | |
| bound_issuer = "https://tfe.example.com" | |
| } | |
| resource "vault_jwt_auth_backend_role" "tfe_workspace" { | |
| backend = vault_jwt_auth_backend.tfe.path |
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
| locals { | |
| ms_tenant_id = "" # TODO: fill in with your Entra ID tenant (looks like a GUID) | |
| ms_oidc_creds = { | |
| client_id = "" # TODO | |
| client_secret = "" # TODO | |
| } | |
| vault_addrs = [ | |
| # TODO: replace with your own list of possible VAULT_ADDRs | |
| "https://vault.example.com:8200", | |
| ] |
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 | |
| set -euo pipefail | |
| . /etc/profile.d/99-vault-cli-config.sh | |
| : "${VAULT_TLS_SERVERNAME:=vault.example.com}" | |
| : "${VAULT_API_PORT:=8200}" | |
| : "${VAULT_CACERT:=${SSL_CERT_FILE:-/etc/ssl/ca-bundle.crt}}" | |
| is-listening() { | |
| nc -z 127.0.0.1 "$VAULT_API_PORT" |
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 bash | |
| set -euo pipefail | |
| git diff --numstat "$@" | awk '{ sum_plus+=$1; sum_minus+=$2 } END { print("+++++ ", sum_plus); print("----- ", sum_minus); }' |
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 bash | |
| set -euo pipefail | |
| if [ $# -lt 1 ]; then | |
| printf 'USAGE: list-paths <command>\n' 1>&2 | |
| exit 1 | |
| fi | |
| bin="$1" | |
| found=0 |
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 python3 | |
| import fileinput | |
| import re | |
| # 7-bit C1 ANSI sequences | |
| ansi_escape = re.compile(r''' | |
| \x1B # ESC | |
| (?: # 7-bit C1 Fe (except CSI) | |
| [@-Z\\-_] |
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 typing import List | |
| import json | |
| def is_wildcard(email) -> bool: | |
| return bool('*' in email) | |
| def main(): |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Label</key> | |
| <string>com.thelonelyghost.fix-jamf-firefox</string> | |
| <key>ProgramArguments</key> | |
| <array> | |
| <string>/bin/zsh</string> | |
| <string>-c</string> |
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
| # Send the log output from this script to user-data.log, syslog, and the console | |
| # From: https://alestic.com/2010/12/ec2-user-data-output/ | |
| exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1 |
NewerOlder