Skip to content

Instantly share code, notes, and snippets.

View Kaezon's full-sized avatar

Brett Costabile Kaezon

View GitHub Profile
@Kaezon
Kaezon / get-secret.yaml
Last active November 16, 2022 19:12
Ansible - Get k8s secrets from inside the cluster
---
# This task runs in a container inside the k8s's cluster
# Other required k8s objects:
# - ServiceAccount
# - Role (with read access to secrets)
# - RoleBinding
- name: Get Secret from K8s API
hosts: localhost
connection: local
@Kaezon
Kaezon / debug-template.yaml
Last active November 1, 2022 19:29
AWX Operator - Debug Template
# This play will render a specified template file and output it
#
# Note: Templates which include other templates will require this playbook to be place in their respective
# template directories due to the use of relative paths in those templates.
# Note: You will also likely need to include appropriate default vars files for the template with the '-e' directive
# Note: Depending on the template, you may still need to add some extra vars to satisfy the template's needs.
#
# Invokation example:
# ansible-playbook debug-template.yaml -e template_path=/opt/ansible/roles/installer/templates/configmaps/config.yaml.j2 -e @/opt/ansible/roles/installer/defaults/main.yml
---
@Kaezon
Kaezon / orbit.py
Last active July 4, 2022 05:54
Kepler orbit simulation
"""Simulation of a Kepler orbit.
I wanted to make some reusable components to simulate Kepler orbits
for use in context of games. Rather than running a physics simulation,
I figured it would be for more efficient to use the mathmatical models
of Kepler orbits.
Required Packages:
- pygame
- esper
@Kaezon
Kaezon / create-repo.py
Last active May 10, 2022 14:12
An automation for Gitea repo creation and initial push
import argparse
import logging
import os
from pathlib import Path
import sys
from time import sleep
import urllib3
from urllib3.util import Retry
from git import Repo
@Kaezon
Kaezon / test_ssl.py
Last active August 14, 2021 14:57
A framework for testing SSL in a threaded environment
"""A framework for testing SSL in a threaded environment.
This script is built with a testing certificate authority in mind.
For this reason, I reccomend building this script into a derrivative
of my docker-python-ssl image for testing:
https://github.com/Kaezon/docker-python-ssl
The MIT License (MIT)
Copyright © 2021 Brett Costabile