Skip to content

Instantly share code, notes, and snippets.

View j-griffith's full-sized avatar

John Griffith j-griffith

  • Bozeman, Montana
View GitHub Profile
@j-griffith
j-griffith / awesome_i3wm.md
Created November 29, 2017 04:56 — forked from it-is-michal/awesome_i3wm.md
My current i3wm config
@j-griffith
j-griffith / main.go
Last active May 11, 2018 03:02
Example extensible gophercloud for microversions
package main
import (
"fmt"
"github.com/gophercloud/gophercloud"
"github.com/gophercloud/gophercloud/openstack"
"github.com/gophercloud/gophercloud/openstack/blockstorage/v3/volumes"
)
diff --git a/pkg/virt-api/validating-webhook/validating-webhook.go b/pkg/virt-api/validating-webhook/validating-webhook.go
index f714e93d..2a158889 100644
--- a/pkg/virt-api/validating-webhook/validating-webhook.go
+++ b/pkg/virt-api/validating-webhook/validating-webhook.go
@@ -25,6 +25,7 @@ import (
"fmt"
"io/ioutil"
"net/http"
+ "regexp"
@j-griffith
j-griffith / cinderlib-csi-lvm.yaml
Last active June 26, 2018 23:08
K8's manifest to deploy cinderlib-lvm CSI driver
# To run you'll need to create an LVM VG named cinder-volumes on the node that will run the cinderlib-lvm pod
# Make sure you enable privileged on your K8's cluster (ie if you're running hack/local-up-cluster.sh you'll need:
# `ALLOW_PRIVILEGED=true hack/local-up-cluster.sh`
# The manifest here should handle the rest, note connect/attach is a work in progress, however provisioning works
# There is a bug with provisioning however, the resultant LV's are 12M in size, even though we're requesting 1G
# There also seems to be some locking contention of LVM2, and I haven't identified exactly where that's coming from
# yet, but I haven't seen it in BlockBox
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
# Based on centos
FROM centos:7.4.1708
LABEL maintainers="Gorka Eguileor <[email protected]>"
LABEL description="Cinderlib CSI Plugin"
RUN yum update -y && yum install -y epel-release \
https://repos.fedorapeople.org/repos/openstack/openstack-pike/rdo-release-pike-1.noarch.rpm
RUN yum update -y && yum install -y targetcli \
iscsi-initiator-utils \
device-mapper-multipath \
<disk type='network' device='cdrom'>
<driver name='qemu' type='raw'/>
<source protocol="http" name="/alpine/v3.8/releases/x86_64/alpine-standard-3.8.0-x86_64.iso">
<host name="http://dl-cdn.alpinelinux.org" port="80"/>
</source>
<target dev='hde' bus='ide' tray='closed'/>
<readonly/>
</disk>
# Fails update, see: https://bugzilla.redhat.com/show_bug.cgi?id=1353296
@j-griffith
j-griffith / init.vim
Created August 17, 2018 12:01
general init.vim
call plug#begin('~/.local/share/nvim/plugged')
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'tpope/vim-rhubarb'
Plug 'bling/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'christooomey/vim-tmux-navigator'
Plug 'Shougo/vimshell.vim'
Plug 'Shougo/vimproc.vim', {'do' : 'make'}
Plug 'airblade/vim-gitgutter'
@j-griffith
j-griffith / tmux.conf
Created August 17, 2018 12:14
simple tmux.conf
# ==========================
# === General settings ===
# ==========================
# set -g default-terminal "xterm-256color"
set -g default-terminal "tmux-256color"
set -g terminal-overrides ',xterm-256color:Tc'
set -g history-limit 20000
set -g buffer-limit 20
set -sg escape-time 0
@j-griffith
j-griffith / const.go
Created September 1, 2018 19:07
Notes for constants moved out of common into controller
package controller
import "time"
// General constants we use for various labels and checks
const (
@j-griffith
j-griffith / controller.diff
Created September 4, 2018 17:24
Minor simplification of flag parsing
diff --git a/cmd/cdi-controller/controller.go b/cmd/cdi-controller/controller.go
index a20c815..6937e7f 100644
--- a/cmd/cdi-controller/controller.go
+++ b/cmd/cdi-controller/controller.go
@@ -2,9 +2,9 @@ package main
import (
"flag"
- "fmt"
"os"