Skip to content

Instantly share code, notes, and snippets.

@oxr463
oxr463 / README.md
Created April 13, 2022 16:58
Rancher v2.6.4 - cattle-cluster-agent error

Rancher v2.6.4 - cattle-cluster-agent error

kubectl get pods -n cattle-system
NAME                                    READY   STATUS             RESTARTS   AGE
cattle-cluster-agent-5d576c8868-kw4g5   0/1     CrashLoopBackOff   39         3h31m
cattle-cluster-agent-5d576c8868-zntln   0/1     CrashLoopBackOff   39         3h30m
lramage@srq-wrk-005:~$ kubectl logs cattle-cluster-agent-5d576c8868-zntln -n cattle-system
INFO: Environment: CATTLE_ADDRESS=10.30.59.102 CATTLE_CA_CHECKSUM= CATTLE_CLUSTER=true CATTLE_CLUSTER_AGENT_PORT=tcp://172.20.114.59:80 CATTLE_CLUSTER_AGENT_PORT_443_TCP=tcp://172.20.114.59:443 CATTLE_CLUSTER_AGENT_PORT_443_TCP_ADDR=172.20.114.59 CATTLE_CLUSTER_AGENT_PORT_443_TCP_PORT=443 CATTLE_CLUSTER_AGENT_PORT_443_TCP_PROTO=tcp CATTLE_CLUSTER_AGENT_PORT_80_TCP=tcp://172.20.114.59:80 CATTLE_CLUSTER_AGENT_PORT_80_TCP_ADDR=172.20.114.59 CATTLE_CLUSTER_AGENT_PORT_80_TCP_PORT=80 CATTLE_CLUSTER_AGENT_PORT_80_TCP_PROTO=tcp CATTLE_CLUSTER_AGENT_SERVICE_HOST=172.20.114.59 CATTLE_CLUSTER_AGENT_SER
@oxr463
oxr463 / calculator_form_wireframe.svg
Created September 28, 2021 23:30
Calculator Form Wireframe
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@oxr463
oxr463 / elb.tf
Last active August 10, 2021 18:05
Elastic Load Balancer Terraform
# SPDX-License-Identifier: 0BSD
resource "aws_elb" "lramage-elb-001" {
availability_zones = [
"us-east-1a",
"us-east-1b"
]
connection_draining = false
connection_draining_timeout = 300
cross_zone_load_balancing = false
idle_timeout = 60
# Check Open Sockets
# See: https://github.com/rancher/rancher/issues/31324
NAME=$(docker ps --format='{{.Names}}' |grep k8s_cluster-register_cattle-cluster-agent)
PID=$(docker inspect -f '{{.State.Pid}}' "$NAME")
[ ! -d /var/run/netns ] && mkdir /var/run/netns
ln -sf /proc/$PID/ns/net "/var/run/netns/$NAME"
ip netns exec ${NAME} lsof -i -n -P
@oxr463
oxr463 / README.md
Last active June 20, 2021 16:34
Differences between uthash and libretro-deps/uthash

Libretro Dependency - uthash

Differences between uthash and libretro-deps/uthash.

Methodology

Clone source repositories

git clone https://github.com/libretro/libretro-deps.git
@oxr463
oxr463 / README.md
Created June 10, 2021 16:05
Linux VR Setup 2020
@oxr463
oxr463 / README.md
Last active January 16, 2022 00:07
System Engineering Internship to Hire

Job title: System Engineer Intern

Location: Tampa, FL (remote)

Reports to: Chief Technology Officer (CTO)

Employment type: full/part time

@oxr463
oxr463 / lowercase_filenames.sh
Last active May 3, 2021 16:53
Lowercase all file names in git repository
#!/bin/sh
# Lowercase all file names in git repository
# SPDX-License-Identifier: 0BSD
# FIXME: recurse subdirectories
for file in *; do
lowercase_name=$(echo $file | awk '{ print tolower($0) }')
# https://stackoverflow.com/a/30654833/8507637
git mv "${file}" "_${lowercase_name}"
@oxr463
oxr463 / Dockerfile
Last active April 16, 2021 15:00
NGINX gzip compression testing image
# SPDX-License-Identifier: MIT
FROM alpine:latest
# Install nginx and enable gzip compression
RUN apk update && \
apk upgrade && \
apk add nginx && \
mkdir -p /run/nginx && \
touch /run/nginx/nginx.pid && \
sed -i 's/#gzip on;/gzip on;/g' /etc/nginx/nginx.conf
@oxr463
oxr463 / README.md
Last active March 30, 2021 16:54
Installing Spriter r10 on Ubuntu 20.04 LTS

Installing Spriter r10 on Ubuntu 20.04 LTS

Instructions

# Ensure the script is executable.
chmod +x install.sh
# Run installer script
./install.sh