Skip to content

Instantly share code, notes, and snippets.

Avatar
💻
./configure --enable-hacker-mode

Lucas Ramage oxr463

💻
./configure --enable-hacker-mode
View GitHub Profile
@oxr463
oxr463 / README.md
Created Apr 13, 2022
Rancher v2.6.4 - cattle-cluster-agent error
View README.md

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
View calculator_form_wireframe.svg
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 Aug 10, 2021
Elastic Load Balancer Terraform
View elb.tf
# 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
View gist:6c1f29ae98b79767d08de8231f1e1110
# 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 Jun 20, 2021
Differences between uthash and libretro-deps/uthash
View README.md

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
Last active Jan 16, 2022
System Engineering Internship to Hire
View README.md

Infinite Omicron

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
Lowercase all file names in git repository
View lowercase_filenames.sh
#!/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 Apr 16, 2021
NGINX gzip compression testing image
View Dockerfile
# 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 Mar 30, 2021
Installing Spriter r10 on Ubuntu 20.04 LTS
View README.md

Installing Spriter r10 on Ubuntu 20.04 LTS

Instructions

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