Skip to content

Instantly share code, notes, and snippets.

View jkeam's full-sized avatar
🍻

Jon Keam jkeam

🍻
View GitHub Profile
@jkeam
jkeam / Dockerfile
Last active April 19, 2024 04:18
Dockerfile for Cookiecutter Django
FROM registry.access.redhat.com/ubi9/python-311:1-52.1712567218
# Build args mainly for asset compilation
ARG DJANGO_SECRET_KEY
ARG REDIS_URL
ARG DJANGO_ADMIN_URL
ARG SPARKPOST_API_KEY
ARG CARE_OFFICE_PASSWORD
ARG DJANGO_AWS_ACCESS_KEY_ID
ARG DJANGO_AWS_SECRET_ACCESS_KEY
@jkeam
jkeam / ocp-api-demo-script.md
Last active February 14, 2024 23:08
OCP API Demo Script

Service Registry Script

API Designer

Link

Designer

Based off of this

@jkeam
jkeam / local-llama.md
Created January 23, 2024 18:43
Running Local Llama

Running Local Llama

Installation

I'm using a Mac, sooooooooooo these instructions are Apple-esque.

brew install ollama
@jkeam
jkeam / rosa-installation-readme.md
Last active January 23, 2024 16:36
Rosa Installation README

Rosa Installation Readme

First, I wanted to say our docs are great, so any of my notes here will just at best be as good -- but most likely worse than the real docs.

Docs

  1. Awesome Official Docs
  2. ROSA Workshop - Although a bit dated, still has lots of gotchas that are still applicable

Installation

@jkeam
jkeam / nodes.sh
Last active January 10, 2024 17:51
CPU Count For All Worker Nodes (Ignoring Infras and Masters)
#!/bin/bash
function help() {
echo "This script finds all the CPU for all worker nodes (ignoring them if they are also infra)"
echo
echo "Syntax: nodes.sh [-g|h]"
echo "options:"
echo "h Print this help."
echo "o Obfuscate node names."
echo
@jkeam
jkeam / generate-secret-key-django.sh
Created January 3, 2024 21:46
Generate Django Secret Key
python manage.py shell
from django.core.management.utils import get_random_secret_key
print(get_random_secret_key())
@jkeam
jkeam / Rails.Dockerfile
Created September 22, 2023 15:38
Dockerfile to build a Universal Developer Image for Dev Spaces to include Ruby and Rails
FROM quay.io/devfile/universal-developer-image:latest
# The following commands require root
USER 0
# Install a recent version of ruby
ENV RUBY_VERSION 3.1.2
RUN dnf -y update && \
dnf -y install rbenv ruby-build sqlite && \
dnf -y clean all --enablerepo='*' && \
@jkeam
jkeam / .devfile.rails.yaml
Created September 22, 2023 15:36
Example DevFile for Rails
schemaVersion: 2.2.0
metadata:
name: rails-blog
attributes:
controller.devfile.io/devworkspace-config:
name: special-workspaces-config
namespace: l0rd-che
components:
- name: bundle-volume
volume:
@jkeam
jkeam / create-aws-vpc.sh
Last active September 9, 2023 17:59
Create AWS VPC and Subnet using AWS CLI and Bash
#!/bin/bash
# taken from: https://brad-simonin.medium.com/create-an-aws-vpc-and-subnet-using-the-aws-cli-and-bash-a92af4d2e54b
export AWS_ACCESS_KEY_ID=something
export AWS_SECRET_ACCESS_KEY=something
export AWS_DEFAULT_REGION=us-east-1
availabilityZone="us-east-1a"
name="Something"