Skip to content

Instantly share code, notes, and snippets.

View todd-dsm's full-sized avatar
🏗️
Just trying stuff...

Todd Thomas todd-dsm

🏗️
Just trying stuff...
  • smpl-cloud
  • SoCal
View GitHub Profile
@todd-dsm
todd-dsm / git.config
Created April 28, 2021 04:33
commands to configure the git client
# Enter these commands into the shell
# Minimally, you'll give a name and email address to begin:
git config --global user.name "fName lName"
git config --global user.email "[email protected]"
git config --global core.editor vim
git config --global color.ui true
git config --global push.default matching
# Dump logs to stdOut and add an alias to see them in reverse:
@todd-dsm
todd-dsm / colorized-output.sh
Last active April 25, 2021 07:09
colorized output with tput
#------------------------------------------------------------------------------
# FUNCTION: First, nobody should do this. Second, it totally works. This is a
# library to print messages in a consistent format.
# AUTHORS: todd-dsm
#------------------------------------------------------------------------------
###----------------------------------------------------------------------------
### VARIABLES
###----------------------------------------------------------------------------
@todd-dsm
todd-dsm / id_rsa_example
Created February 11, 2021 21:08
a typical ssh private key with 4096 bits of encryption. the command to generate such keys is on line one
# ssh-keygen -t rsa -b 4096 -f /tmp/id_rsa -C "disposable key"
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAACFwAAAAdzc2gtcn
NhAAAAAwEAAQAAAgEA6CVApa/seMAN7yh4yg3hOuRdgmAxbx5qgrE0VZ63/nzKTRZtz3Co
lpmMg9tvRhQa+RKJRNh4Bs1Gn3gvSlxSzRD+c8C6fpTSdB4hcx7QvnI85FQWLvIIjHPIj3
yf58xjz212WscwfsDVXyjUaYx6JfnG+Z/JuVG6MwYVPAGpQn5xHkEtfo69LWWx3ohNQrJH
0M7gUiki+2mi08Jn+fpgXgGJmyLPEI5luy3jlNTmONu9lkA42fLYJyKQHn2jYtaKgyJSyW
kmfLuJhlBQ3kLP2eJ/UjY5954628ARaLkr3fEF7OVVtnIrZUzlQKCwlGh+4jnPnauoui5P
vHcgpwpilBKglMo58al6ADtGo5X2ju+/KLcVHRXO8FvrK6OLNZlJ8cQwSAzWWsKNYj4GnA
F1RUT/3tXXHANQkeLoKF9E/DXchIjJfeKADCR8kbQ2zvzi73weyhhqdDbi3K3s8SEXbOly
@todd-dsm
todd-dsm / auto-deploy-values.yaml
Last active November 6, 2024 00:04
example gitlab auto devops config with annotations for vault, datadog, etc
# This is a fully-formed GitLab Pipeline using Auto DevOps:
# Location: root of the code repo: .gitlab/auto-deploy-values.yaml
# https://docs.gitlab.com/ee/topics/autodevops/#features
name: my-service
replicaCount: 3
strategyType:
enableSelector:
deploymentApiVersion: apps/v1
image:
repository: gitlab.com/myGroup/myProject/my-service
@todd-dsm
todd-dsm / main.tf
Last active January 22, 2021 22:48
failing on the node creation
# -----------------------------------------------------------------------------
# Kubernetes Cluster for Applications
# -----------------------------------------------------------------------------
# Networking: VPC
# https://registry.terraform.io/modules/cloudposse/vpc/aws/latest
# -----------------------------------------------------------------------------
module "apps_vpc" {
source = "cloudposse/vpc/aws"
version = "0.18.0"
namespace = var.myCo
@todd-dsm
todd-dsm / myapp.json
Created November 19, 2020 22:49
simple keys/values in json
{
"KEY1": "value1",
"KEY2": "value2",
"KEY3": "value3"
}
@todd-dsm
todd-dsm / override-values.yaml
Last active November 9, 2020 20:21
vault ui definition; exposes the ui on 443 BUT does NOT require TLS for private COMMS; works
# Vault Helm Chart Value Overrides
global:
enabled: true
tlsDisable: true
# Create PodSecurityPolicy for pods
psp:
enable: false
# Annotation for PodSecurityPolicy.
# This is a multi-line templated string map, and can also be set as YAML.
annotations: |
@todd-dsm
todd-dsm / messages
Created October 31, 2020 20:00
an excerpt of events from a system log; referenced by the Google Doc "observability".
Oct 31 19:57:04 wfma-dev sshd[11583]: Accepted publickey for userName from aaa.bbb.ccc.ddd port 55305 ssh2: RSA SHA256:xbm3DZ4C0XNIaxD/dRLN/g0v/eZOl9vVIXFYYwgFVd0
Oct 31 19:57:04 wfma-dev systemd-logind[2852]: New session 6816 of user userName.
Oct 31 19:57:04 wfma-dev systemd[1]: Started Session 6816 of user userName.
Oct 31 19:57:04 wfma-dev systemd[1]: Starting Session 6816 of user userName.
Oct 31 19:57:04 wfma-dev sshd[11583]: pam_unix(sshd:session): session opened for user userName by (uid=0)
# DO NOT UNCOMMENT THIS
#Host *
# UseKeychain yes
# AddKeysToAgent yes
# IdentityFile ~/.ssh/id_rsa
# StrictHostKeyChecking no
## Personal GitHub account
Host github.com
HostName github.com
@todd-dsm
todd-dsm / override-values-tls.yaml
Last active April 25, 2023 07:05
vault ui definition; exposes the ui on 443 AND requires TLS for private COMMS; this is still raw
# Vault Helm Chart Value Overrides
global:
enabled: true
tlsDisable: false
#injector:
# enabled: true
# # Use the Enterprise Image
# image:
# repository: "hashicorp/vault-enterprise"