Skip to content

Instantly share code, notes, and snippets.

View mdfranz's full-sized avatar

Matt Franz mdfranz

  • Lutherville Timonium MD
  • 10:35 (UTC -04:00)
View GitHub Profile
@mdfranz
mdfranz / windmill_example_boto.py
Last active August 17, 2024 15:42
Windmill Python Boto
import os
import wmill
import boto3
# see https://windmill.dev
def main(): # Specify the parameter type as a dictionary
aws_accounts = []
aws_accounts.append(wmill.get_resource("u/mdfranz/aws_9431"))
aws_accounts.append(wmill.get_resource("u/mdfranz/aws_6473"))
@mdfranz
mdfranz / crossplane-f-around-and-find-out.md
Last active August 4, 2024 21:41
Playing with Crossplane
@mdfranz
mdfranz / cf-cvpn-examples.md
Last active July 27, 2024 21:57
Generating AWS Client VPN CloudFormation with Various LLMs

Prompt

Generate CloudFormation Resources in YAML to create VPC that has AWS Client VPN endpoints

Models from Macbook Air M1/16GB

llama3.1:latest

#!/bin/bash
# Function to check if AWS CLI tools are available
function check_aws_cli() {
if ! which aws &> /dev/null; then
echo "Error: AWS CLI not found. Please install AWS CLI and configure credentials."
exit 1
fi
}
sinks:
opensearch:
type: elasticsearch
endpoint: https://127.0.0.1:9200
mode: bulk
compression: none
suppress_type_name: true
healthcheck:
enabled: true
bulk:
@mdfranz
mdfranz / k3s_helm_install.sh
Created October 16, 2022 02:17 — forked from icebob/k3s_helm_install.sh
K3S + Helm installing
# Install K3S
curl -sfL https://get.k3s.io | sh -
# Copy k3s config
mkdir $HOME/.kube
sudo cp /etc/rancher/k3s/k3s.yaml $HOME/.kube/config
sudo chmod 644 $HOME/.kube/config
# Check K3S
kubectl get pods -n kube-system
ubuntu@cass1:~$ cqlsh
Connected to Test Cluster at 127.0.0.1:9042
[cqlsh 6.1.0 | Cassandra 4.1 | CQL spec 3.4.5 | Native protocol v5]
Use HELP for help.
cqlsh> select * from bind.queries;
src_ip | query | ts
---------------+-------------------------------+---------------------------------
192.168.3.141 | inbox.google.com | 2022-10-01 00:50:26.000000+0000
192.168.3.30 | verizon.net | 2022-10-01 00:50:20.000000+0000
data_dir: /var/lib/vector
sources:
daemon_log:
type: file
include:
- "/var/log/daemon.log"
read_from: beginning
transforms:
@mdfranz
mdfranz / vector.toml
Created August 28, 2022 22:37
Better VRL for Iptables messages
# See the Vector Remap Language reference for more info: https://vrl.dev
[sources.k3s]
type = "journald"
include_units = ["k3s"]
[sources.kernel]
type = "file"
include = ["/var/log/messages"]
[transforms.iptables_parse]
inputs = ["kernel"]
type = "remap"
@mdfranz
mdfranz / vector.toml
Created August 28, 2022 22:14
k3s and iptables logs to CloudWatch with Vector
# See the Vector Remap Language reference for more info: https://vrl.dev
[sources.k3s]
type = "journald"
include_units = ["k3s"]
[sources.kernel]
type = "file"
include = ["/var/log/messages"]
[transforms.iptables_parse]