Skip to content

Instantly share code, notes, and snippets.

View thospfuller's full-sized avatar
🎯
Focusing

Thomas P. Fuller thospfuller

🎯
Focusing
View GitHub Profile
@thospfuller
thospfuller / infinispan-distributed-cache-example.groovy
Created March 29, 2021 02:14
An Infinispan Distributed Cache example written in Groovy script and which will run in the Groovy Console.
@GrabResolver(name='JBoss Release Repository', root='https://repository.jboss.org/nexus/content/repositories/releases/')
@GrabResolver(name='JBoss.org Maven repository', root='https://repository.jboss.org/nexus/content/groups/public')
@GrabExclude(group = 'org.jboss.spec.javax.ws.rs', module='jboss-jaxrs-api_2.1_spec')
@GrabExclude(group = 'org.jboss.spec.javax.xml.bind', module='jboss-jaxb-api_2.3_spec')
@GrabExclude(group = 'org.jboss.spec.javax.servlet', module='jboss-servlet-api_3.1_spec')
@GrabExclude(group = 'javax.validation', module='validation-api')
@GrabExclude(group = 'org.jboss.spec.javax.annotation', module='jboss-annotations-api_1.2_spec')
@GrabExclude(group = 'net.jcip', module='jcip-annotations')
@GrabExclude(group = 'javax.activation', module='activation')
@thospfuller
thospfuller / pagespeed.conf
Last active January 29, 2021 14:17
Ubuntu LAMP, WordPress, ModPageSpeed configuration in /etc/apache2/mods-enabled/pagespeed.conf which works with W3 Total Cache and StackPath CDN.
<IfModule pagespeed_module>
<Location /wp-admin/>
ModPagespeed Off
</Location>
ModPagespeed On
ModPagespeedAllow all
ModPagespeedFetchHttps enable
@thospfuller
thospfuller / main.go
Created January 11, 2021 22:08
A simple Go program which prints the user's home directory value.
/* To build:
* go get k8s.io/client-go/util/homedir
* go build main.go
*
* To run:
* ./main
*/
package main
import "fmt"
@thospfuller
thospfuller / nginx-hp-minimounted.yaml
Created December 11, 2020 02:05
An Nginx pod with the local /etc/minimount directory mounted as /etc/minimount to be run in Minikube (note that zero parameters need to be passed when starting Minikube for this to work).
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: null
labels:
run: nginx-minimounted
name: nginx-minimounted
namespace: myns
spec:
containers:
@thospfuller
thospfuller / nginx-with-minimount-directory-mounted.yaml
Last active December 11, 2020 02:03
An Nginx pod with the local /etc/minimount directory mounted as /etc/minimount to be run in Minikube (you must start Minikube with --mount and --mount-string set for this to work).
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: null
labels:
run: nginx-minimounted
name: nginx-minimounted
namespace: myns
spec:
volumes:
@thospfuller
thospfuller / minikube-restart.sh
Created December 9, 2020 21:37
Minikube start
minikube stop
minikube start --hyperv-virtual-switch "My Virtual Switch" --v=4 --mount --mount-string="/etc/minimount/:/etc/minimount"
@thospfuller
thospfuller / components.yaml
Last active November 30, 2020 02:55
An example components.yaml required for installing the Kubernetes Metrics Server on Minikube running in Ubuntu.
#
# Jump to line ~ 141 to ~ 215 for the command that pertains to this change.
#
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
k8s-app: metrics-server
name: metrics-server
namespace: kube-system
@thospfuller
thospfuller / question-five-deployment.yaml
Last active July 15, 2022 13:03
Practice Exam for Certified Kubernetes Application Developer (CKAD) Certification Question 5 Deployment Yaml
# See question 5 from the article entitled "Practice Exam for Certified Kubernetes Application Developer (CKAD) Certification".
#
# https://matthewpalmer.net/kubernetes-app-developer/articles/ckad-practice-exam.html
#
# Answered in the article entitled "Answers to Five Kubernetes CKAD Questions (2020)" here:
#
# https://thospfuller.com/2020/11/09/answers_to_five_kubernetes_ckad_questions_2020/
#
apiVersion: apps/v1
kind: Deployment
@thospfuller
thospfuller / question-four-pod.yaml
Last active August 8, 2022 22:21
Practice Exam for Certified Kubernetes Application Developer (CKAD) Certification Question 4 Pod Yaml
# See question 4 from the article entitled "Practice Exam for Certified Kubernetes Application Developer (CKAD) Certification".
#
# https://matthewpalmer.net/kubernetes-app-developer/articles/ckad-practice-exam.html
#
# Answered in the article entitled "Answers to Five Kubernetes CKAD Questions (2020)" here:
#
# https://thospfuller.com/2020/11/09/answers_to_five_kubernetes_ckad_questions_2020/
#
apiVersion: v1
kind: Pod
@thospfuller
thospfuller / question-three-pod.yaml
Last active June 12, 2022 00:38
Practice Exam for Certified Kubernetes Application Developer (CKAD) Certification Question 3 Pod Yaml
# See question 3 from the article entitled "Practice Exam for Certified Kubernetes Application Developer (CKAD) Certification".
#
# https://matthewpalmer.net/kubernetes-app-developer/articles/ckad-practice-exam.html
#
# Answered in the article entitled "Answers to Five Kubernetes CKAD Questions (2020)" here:
#
# https://thospfuller.com/2020/11/09/answers_to_five_kubernetes_ckad_questions_2020/
#
apiVersion: v1
kind: Pod