Skip to content

Instantly share code, notes, and snippets.

View mcascone's full-sized avatar
💻
optimistic

Max Cascone mcascone

💻
optimistic
View GitHub Profile
@mcascone
mcascone / hello.tf
Created May 20, 2019 15:00
Terraform and vRa7 Example
# These are set via $env:TF_VAR_x = $env:<var_x>
variable "VRA_USER" {}
variable "VRA_PASS" {}
provider "vra7" {
username = "${var.VRA_USER}"
password = "${var.VRA_PASS}"
tenant = "<tenant_name>"
host = "<https://your.vra.host>"
# insecure = true
@mcascone
mcascone / addcerts.md
Created October 28, 2022 17:43
linux certs cheatsheet
keytool -list -keystore /etc/pki/java/cacerts

sudo keytool -list -v -keystore cacerts > /home/engineering/keys.txt

keytool -list -v -keystore cacerts -storepass changeit | grep -i consilio

keytool -list -v -keystore cacerts -alias consilio-cert-issuer -storepass changeit

sudo keytool -keystore cacerts -import -alias consilio-certs-issuer -file /home/engineering/consilio-certs-issuer
@mcascone
mcascone / ReadMe.md
Created October 28, 2022 17:47
Two Jira ID commit hooks

2 git-jira hook integration scripts

This gist contains two different implementations of automatically appending the Jira ID to the git commit message.

I don't know if one way is better than the other. Choose one and create a file in your repo. It must be named exactly: prepare-commit-msg (no extension) and placed in the <repo-name>/.git/hooks dir.

Very detailed discussion here: https://stackoverflow.com/questions/427207/can-git-hook-scripts-be-managed-along-with-the-repository

Also! Very important!

@mcascone
mcascone / k8sCheats.md
Created November 9, 2022 18:24
Kubernetes cheat sheet

get cluster .kubeconfig info (server, certs, etc)

strip --context to use current context:

kubectl config view --minify --flatten --context=kind-terraform-learn

host == clusters.cluster.server client_certificate == users.user.client-certificate-data client_key == users.user.client-key-data cluster_ca_certificate == clusters.cluster.certificate-authority-data

@mcascone
mcascone / gitlab cli
Created January 11, 2023 21:50
GitLab cheat sheet
# Get list of projects
curl --request GET --header "PRIVATE-TOKEN: $YUM_GITLAB_TOKEN" "https://gitlab.yum.com/api/v4/projects?per_page=100&page=1" | jq '.[]'
# Get list of projects and select on with id 24
curl --request GET --header "PRIVATE-TOKEN: $YUM_GITLAB_TOKEN" "https://gitlab.yum.com/api/v4/projects?per_page=100&page=1" | jq '.[] | select(.id=="24")'
# Get list of projects with name search
curl --request GET --header "PRIVATE-TOKEN: $YUM_GITLAB_TOKEN" "https://gitlab.yum.com/api/v4/projects?per_page=100&page=1&search=olympus" | jq '.[]'
# Get list of files in root of repo
@mcascone
mcascone / .alias
Last active February 23, 2023 17:15
my zsh aliases
#!/bin/zsh
# spell:disable
# this file is sourced by ~/.zshrc every time a new shell is opened
# pull in keys/tokens/etc
source ~/.secrets
## MISC
alias ll='ls -algp'
@mcascone
mcascone / temp-prom-graf.md
Created November 1, 2023 05:38
temporal, prom, graf