Skip to content

Instantly share code, notes, and snippets.

View jgavinray's full-sized avatar
That's me

J. Gavin Ray jgavinray

That's me
View GitHub Profile
jgavinray / gist:b79fdfa5467f21c7579d83835e69a313
Created April 5, 2023 15:53
Keras on local bare metal Ubuntu 22.04
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install nvidia-driver-525-server
conda create --name keras
conda activate keras
conda install keras-gpu
### Keybase proof
I hereby claim:
* I am jgavinray on github.
* I am jgavinray ( on keybase.
* I have a public key ASAdXhPMjQfxqqGEJF4WZ7-TC5f-u7E_0-Cwt1sMyd5GFAo
To claim this, I am signing this object:
jgavinray /
Last active January 6, 2022 23:31 — forked from c0dyhi11/
Ubuntu 20.04 Tinkerbell deployment
# Become the root user because I didn't verifiy sudo for every command.
# Install Tinkerbell
sudo apt-get update -y
sudo apt-get install -y apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
jgavinray /
Last active June 25, 2021 21:22
Tear down my minikube environment
minikube stop
virsh detach-disk --domain minikube-m02 /var/lib/libvirt/images/minikube-m02.qcow2 --persistent --config --live
virsh detach-disk --domain minikube-m03 /var/lib/libvirt/images/minikube-m03.qcow2 --persistent --config --live
virsh detach-disk --domain minikube-m04 /var/lib/libvirt/images/minikube-m04.qcow2 --persistent --config --live
virsh detach-disk --domain minikube-m05 /var/lib/libvirt/images/minikube-m05.qcow2 --persistent --config --live
minikube delete
sudo rm /var/lib/libvirt/images/minikube-m02.qcow2
jgavinray /
Last active April 28, 2024 08:01
Setting up local Minikube with Ceph for a small test lab
minikube start --memory="8GB" --cpus=4 --nodes=5 --driver kvm2
sudo qemu-img create -f qcow2 /var/lib/libvirt/images/minikube-m02.qcow2 25000M -o preallocation=full
sudo qemu-img create -f qcow2 /var/lib/libvirt/images/minikube-m03.qcow2 25000M -o preallocation=full
sudo qemu-img create -f qcow2 /var/lib/libvirt/images/minikube-m04.qcow2 25000M -o preallocation=full
sudo qemu-img create -f qcow2 /var/lib/libvirt/images/minikube-m05.qcow2 25000M -o preallocation=full
virsh attach-disk --domain minikube-m02 /var/lib/libvirt/images/minikube-m02.qcow2 --target vdb --persistent --config --live
virsh attach-disk --domain minikube-m03 /var/lib/libvirt/images/minikube-m03.qcow2 --target vdb --persistent --config --live
virsh attach-disk --domain minikube-m04 /var/lib/libvirt/images/minikube-m04.qcow2 --target vdb --persistent --config --live
ssh $(whoami)@ '/usr/local/bin/'
ssh $(whoami)@ '/usr/local/bin/'
ssh $(whoami)@ '/usr/local/bin/'
ssh $(whoami)@ '/usr/local/bin/'
ssh $(whoami)@ '/usr/local/bin/'
jgavinray /
Last active July 3, 2020 14:49
Install K3s from scratch - from local machine
# Assumptions below:
# Your local user has ssh access to the server and agent machines
# Your user on those machines is a sudo user with NOPASSWD configured
export USER=$(whoami)
export SERVER_IP=
export AGENT_1_IP=
export AGENT_2_IP=
export AGENT_3_IP=
$ sudo mkdir /etc/pf-files
In /etc/pf.conf the following needs to be added:
1. In the prerequisites-section add:
table <blocked_zones> persist file "/etc/pf-files/blocked_zones"
2. In the block-section add early:
block in quick proto tcp from <blocked_zones> to any port { 22 80 }
#! /bin/sh
# Purpose: Block all traffic from specific countries. Use ISO code. #
jgavinray / README.MD
Created March 29, 2020 13:27 — forked from lmarkus/README.MD
Extracting / Exporting custom emoji from Slack

Extracting Emoji From Slack!

Slack doesn't provide an easy way to extract custom emoji from a team. (Especially teams with thousands of custom emoji) This Gist walks you through a relatively simple approach to get your emoji out.

If you're an admin of your own team, you can get the list of emoji directly using this API: Once you have it, skip to Step 3

HOWEVER! This gist is intended for people who don't have admin access, nor access tokens for using that list.

Follow along...

jgavinray / ubuntu.ks
Created February 17, 2020 16:23 — forked from funzoneq/ubuntu.ks
Ubuntu kickstart file
#Generated by Kickstart Configurator
# Fetch content from here
url –url
#System language
lang en_US.UTF-8
#Language modules to install