Skip to content

Instantly share code, notes, and snippets.

View rkamradt's full-sized avatar

Randy Kamradt rkamradt

View GitHub Profile
@rkamradt
rkamradt / config.yml
Last active November 18, 2020 20:58
Vouch proxy config for use with Okta
vouch:
logLevel: debug
domains:
- vouch
- kamradtfamily.net
cookie:
domain: kamradtfamily.net
jwt:
secret: **Some abitrary secret that must match on all instances**
oauth:
@rkamradt
rkamradt / base.html.twig
Last active September 24, 2020 12:24
Basic twig template including Bootstrap 4
{# templates/base.html.twig #}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>{% block title %}Wine List{% endblock %}</title>
@rkamradt
rkamradt / Dockerfile
Last active September 26, 2020 21:48
Fat image of PHP/Composer/Symfony
FROM php:7.3
WORKDIR /var/www
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
php -r "if (hash_file('sha384', 'composer-setup.php') === '795f976fe0ebd8b75f26a6dd68f78fd3453ce79f32ecb33e7fd087d39bfeb978342fb73ac986cd4f54edd0dc902601dc') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \
php composer-setup.php && \
php -r "unlink('composer-setup.php');" && \
mv composer.phar /bin/composer
@rkamradt
rkamradt / pom.xml
Created July 24, 2020 19:21
Spring Boot with Kotlin Dependencies
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.6.RELEASE</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<kotlin.version>1.3.72</kotlin.version>
<kotlin.code.style>official</kotlin.code.style>
<junit.version>4.12</junit.version>
@rkamradt
rkamradt / pom.xml
Created July 24, 2020 19:17
Plugins for Kotlin
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>build-info</goal>
</goals>
</execution>
@rkamradt
rkamradt / kaniko-pod.yaml
Last active July 23, 2020 19:51
A pod to run kaniko to build images in Kubernetes
apiVersion: v1
kind: Pod
metadata:
name: kaniko
spec:
containers:
- name: jnlp
workingDir: /tmp/jenkins
- name: kaniko
workingDir: /tmp/jenkins
@rkamradt
rkamradt / Jenkinsfile
Last active July 23, 2020 20:01
Build Step with Kaniko
pipeline {
agent any
stages {
stage('Build') {
agent {
kubernetes {
label 'kaniko'
idleMinutes 5
yamlFile 'kaniko-pod.yaml'
defaultContainer 'kaniko'
@rkamradt
rkamradt / nginx.conf
Created June 22, 2020 21:53
Nginx configuration that works with React routes
worker_processes auto;
events {
worker_connections 8000;
multi_accept on;
}
http {
include /etc/nginx/mime.types;
@rkamradt
rkamradt / main.go
Last active June 18, 2020 12:35
Simple Go web read service
package main
import (
"context"
"fmt"
"log"
"net/http"
"os"
"time"
@rkamradt
rkamradt / csiinstall.sh
Created May 31, 2020 14:51
Create and check for csi drivers in a Kubernetes Cluster
kubectl create -f https://raw.githubusercontent.com/kubernetes/csi-api/release-1.13/pkg/crd/manifests/csidriver.yaml
kubectl create -f https://raw.githubusercontent.com/kubernetes/csi-api/release-1.13/pkg/crd/manifests/csinodeinfo.yaml
# check that they exist:
kubectl get customresourcedefinition.apiextensions.k8s.io/csidrivers.csi.storage.k8s.io
kubectl get customresourcedefinition.apiextensions.k8s.io/csinodeinfos.csi.storage.k8s.io