Skip to content

Instantly share code, notes, and snippets.

View bradfordcp's full-sized avatar

Christopher Bradford bradfordcp

View GitHub Profile
.PHONY: setup
setup:
oc project tls-demo
echo "Login to the OpenShift console and install cass-operator and cert-manager operators either globally or within the tls-demo namespace"
.PHONY: setup-issuers
setup-issuers:
echo "Provisioning self signed certificate issuer and CA with cert-manager"
oc apply -f selfsigned.issuer.yaml
oc apply -f ca.certificate.yaml
apiVersion: k8ssandra.io/v1alpha1
kind: K8ssandraCluster
metadata:
name: foo
spec:
auth: false
cassandra:
serverType: dse
serverVersion: 6.8.32
resources:
@bradfordcp
bradfordcp / petclinic.asb.yaml
Last active November 13, 2020 21:28
Adding Astra Service Broker to reactive petclinic
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: petclinic-backend
labels:
app: petclinic-backend
spec:
replicas: 1
selector:
#! /bin/env fish
set NVIDIA_GPU_COUNT (/usr/sbin/lspci | grep -i nvidia | wc -l)
if test "$NVIDIA_GPU_COUNT" -gt 1
echo "Setting graphics to eGPU"
/usr/local/bin/gswitch egpu
else
echo "Setting graphics to Intel"
/usr/local/bin/gswitch internal-intel
@bradfordcp
bradfordcp / data.csv
Created March 7, 2020 18:55
Plotly filter example
col1 x y
a -3 -3
a -2 -2
a -1 -1
b 0 0
c 1 1
c 2 2
c 3 3
bradfordcp@domino ~> crc start -p ~/Downloads/pull-secret --log-level debug
DEBU No new version available, latest version at mirror is 1.0.0-rc.0
INFO Checking if running as non-root
INFO Checking if oc binary is cached
DEBU oc binary already cached
INFO Checking if Virtualization is enabled
DEBU Checking if the vmx/svm flags are present in /proc/cpuinfo
DEBU CPU virtualization flags are good
INFO Checking if KVM is enabled
DEBU Checking if /dev/kvm exists
@bradfordcp
bradfordcp / Gemfile
Last active September 29, 2017 05:12
Pulls Touch Down stats from pro-football-reference.com
source 'https://rubygems.org'
gem 'nokogiri'

Keybase proof

I hereby claim:

  • I am bradfordcp on github.
  • I am bradfordcp (https://keybase.io/bradfordcp) on keybase.
  • I have a public key ASBNKjC6OT8sFez-fWd7Kyg6YfjDr_n3s4wc3YGk6rsYwAo

To claim this, I am signing this object:

@bradfordcp
bradfordcp / README.md
Last active July 28, 2023 10:10
Setting up Apache Spark to use Apache Shiro for authentication of Spark Master dashboard.

Securing Apache Spark with Apache Shiro

  1. Download shiro-core-1.2.5.jar Apache Shiro Downloads
  2. Download shiro-web-1.2.5.jar Apache Shiro Downloads
  3. Note the location of the JAR files and shiro.ini. I placed it in the root of my Spark download
  4. Update the spark-env.sh file with the Shiro JARs and add an entry for the path where the shiro.ini resides
  5. Start the Spark master sbin/start-master.sh
  6. Navigate to the Spark master dashboard
  7. Authenticate with credentials in shiro.ini

Note this was developed / tested with Apache Spark 1.4.1, but should work with newer versions as well.

@bradfordcp
bradfordcp / README.md
Last active August 29, 2015 14:25
Provides a CLI to manage SSH keys pulled from GitHub in ~/.ssh/authorized_keys.

gh_keys

A CLI tool to add public keys to your host. The keys are pulled via GitHub API.

Listing all keys for the current user

Lists all keys, it will break down keys by GitHub username.

gh_keys list
GitHub Keys: