Skip to content

Instantly share code, notes, and snippets.

View rbramwell's full-sized avatar
🚀
Blazing a trail the likes of which has never been seen.

Rory Bramwell rbramwell

🚀
Blazing a trail the likes of which has never been seen.
View GitHub Profile
@rbramwell
rbramwell / git-trigger-build.sh
Created January 12, 2022 13:17 — forked from trustin/git-trigger-build.sh
git-trigger-build: Triggers a CI build by pushing an empty commit
#!/bin/bash -e
# Stash the staged files if any.
NEEDS_UNSTASH=0
if ! git diff --staged --exit-code >/dev/null; then
echo -ne '\033[1;32m'
echo -n 'Stashing the staged files'
echo -e '\033[0m'
git stash
NEEDS_UNSTASH=1
@rbramwell
rbramwell / etcdclient.yaml
Created December 3, 2020 12:37 — forked from mauilion/etcdclient.yaml
etcdclient static pod with all the bits configured.
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: null
labels:
component: etcdclient
tier: debug
name: etcdclient
namespace: kube-system
spec:
@rbramwell
rbramwell / Vagrantfile
Created November 11, 2020 19:19 — forked from leifg/Vagrantfile
Add a second disk to system using vagrant
file_to_disk = './tmp/large_disk.vdi'
Vagrant::Config.run do |config|
config.vm.box = 'base'
config.vm.customize ['createhd', '--filename', file_to_disk, '--size', 500 * 1024]
config.vm.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk]
end
@rbramwell
rbramwell / psp.yml
Created August 18, 2020 08:48 — forked from abhisek/psp.yml
PodSecurityPolicy to Prevent hostPath Mount
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
name: developers-psp
spec:
privileged: false
allowPrivilegeEscalation: false
hostNetwork: false
hostPID: false
hostIPC: false
@rbramwell
rbramwell / binarySearchTree.py
Created April 7, 2020 01:38 — forked from jakemmarsh/binarySearchTree.py
a simple implementation of a Binary Search Tree in Python
class Node:
def __init__(self, val):
self.val = val
self.leftChild = None
self.rightChild = None
def get(self):
return self.val
def set(self, val):
@rbramwell
rbramwell / cloudbuild.yaml
Last active January 23, 2020 14:18 — forked from hazcod/cloudbuild.yaml
Clean container registry images in Google Cloud Build step.
substitutions:
_IMG_KEEP: "3"
steps:
- name: 'gcr.io/cloud-builders/gcloud-slim'
entrypoint: 'bash'
args:
- '-c'
@rbramwell
rbramwell / housekeeping_images.sh
Created January 23, 2020 14:16 — forked from DaanGeurts/housekeeping_images.sh
Deleting unused images from Google Container Registry, leaving x number left
#!/bin/bash
# Copyright © 2017 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@rbramwell
rbramwell / housekeeping_images.sh
Created January 23, 2020 14:16 — forked from DaanGeurts/housekeeping_images.sh
Deleting unused images from Google Container Registry, leaving x number left
#!/bin/bash
# Copyright © 2017 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@rbramwell
rbramwell / gist:8f1a6cb5043ee22e6a9e07ff6b22ce8d
Created May 2, 2019 13:31 — forked from malzzz/gist:15639fc36d069490b7709be2f3a4d522
Install Scala 2.12.3 and SBT using apt-get on Ubuntu 16.04
## Java
sudo apt-get update
sudo apt-get install default-jdk
## Scala
sudo apt-get remove scala-library scala
sudo wget https://downloads.lightbend.com/scala/2.12.3/scala-2.12.3.deb
sudo dpkg -i scala-2.12.3.deb
sudo apt-get update
sudo apt-get install scala
@rbramwell
rbramwell / devops-kpi-nifi-template.xml
Created September 21, 2018 07:06 — forked from fabiojose/devops-kpi-nifi-template.xml
DevOps KPI in Practice - Chapter 2
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<template encoding-version="1.2">
<description></description>
<groupId>8ce97bbb-0162-1000-233e-5c8cc4c3a93f</groupId>
<name>DevOps KPI - Change Volume and Lead Time</name>
<snippet>
<connections>
<id>8a0d9e3d-1744-3d97-0000-000000000000</id>
<parentGroupId>33980602-0d29-3ae1-0000-000000000000</parentGroupId>
<backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold>