Skip to content

Instantly share code, notes, and snippets.

View abuxton's full-sized avatar
💭
Always discombobulated. Never really too busy.

adam buxton abuxton

💭
Always discombobulated. Never really too busy.
View GitHub Profile
@abuxton
abuxton / .gitignore
Last active July 22, 2022 15:07 — forked from croxton/SSL-certs-OSX.md
Generate ssl certificates with Subject Alt Names
# Created by https://www.toptal.com/developers/gitignore/api/ssl
# Edit at https://www.toptal.com/developers/gitignore?templates=ssl
*.csr
*.pem
*.key
*.crt
# End of https://www.toptal.com/developers/gitignore/api/ssl
@abuxton
abuxton / openssl.markdown
Created July 19, 2022 15:10 — forked from leommoore/openssl.markdown
OpenSSL Basics

#OpenSSL Basics

##Certificate Types

  • CA Certificate Authority
  • CRL Certificate Revocation List
  • CSR Certificate Signing Request
  • DCA Deligate Certificate Authority
  • DER Data Encryption Standard
  • DES Data Encryption Standard
  • DH Diffie-Hellmann
https://kubernetes.io/docs/tasks/debug-application-cluster/debug-running-pod/
https://kubernetes.io/docs/reference/kubectl/cheatsheet/
# examples
kubectl -n terraform-cloud-agent get all
kubectl -n terraform-cloud-agent logs terraform-cloud-agent-84546788bc-jfmtt -f #-f for follow
kubectl -n terraform-cloud-agent logs terraform-cloud-agent-84546788bc-jfmtt terraform-cloud-agent
kubectl -n terraform-cloud-agent describe pod terraform-cloud-agent-84546788bc-jfmtt
provider "aws" {
region = "us-east-1"
## uses default env_var from aws
#AWS_ACCESS_KEY_ID="anaccesskey"
#AWS_SECRET_ACCESS_KEY="asecretkey"
#AWS_DEFAULT_REGION="us-west-2"
}
# Additional provider configuration for west coast region; resources can
# reference this as `aws.alt`.
@abuxton
abuxton / README.MD
Last active February 3, 2022 16:11
Scrape Globals from Replicated/terraform enterprise install.sh
@abuxton
abuxton / README.MD
Last active May 4, 2023 12:49 — forked from idokd/scrap-ca-to-bundle.sh
Scrape site for its certificates, validate and create a ca bundle, for the use in downloading a local copy of Certificate Authorities (CAs)
def get_ca_bundle():
"""Tries to find the platform ca bundle for the system (on linux systems)"""
ca_bundles = [
# list taken from https://golang.org/src/crypto/x509/root_linux.go
"/etc/ssl/certs/ca-certificates.crt", # Debian/Ubuntu/Gentoo etc.
"/etc/pki/tls/certs/ca-bundle.crt", # Fedora/RHEL 6
"/etc/ssl/ca-bundle.pem", # OpenSUSE
"/etc/pki/tls/cacert.pem", # OpenELEC
"/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem", # CentOS/RHEL 7
]
@abuxton
abuxton / self-signed-certificate-with-custom-ca.md
Created January 21, 2022 14:53 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@abuxton
abuxton / rhel7-docker-install.sh
Created December 1, 2021 15:27
rhel7-docker-install
#! /bin/bash +X
# later we will disable selinux
# sudo setenforce Permissive
# getenforce # just incase youy want to check selinuxmode
# lets make sure we are a clean install of docker
sudo yum remove docker docker-common docker-selinux docker-engine-selinux docker-engine docker-ce
# now install some tools dmpd(for short) ensures rhel 7 respects gpg settings in repos (issue is https://access.redhat.com/solutions/2850911) see https://access.redhat.com/discussions/5336741 for the fix
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo