Skip to content

Instantly share code, notes, and snippets.

View scottrigby's full-sized avatar
🤓

Scott Rigby scottrigby

🤓
View GitHub Profile
@scottrigby
scottrigby / xhyve-minikube-start.sh
Last active July 16, 2017 17:15
⛔️ [DEPRECATED] Minikube + xhyve workaround
#! /bin/bash
# Minikube 0.19 has some issues with with xhyve driver after stop. Workaround.
xhyve_minikube_start() {
# Require the administrator password upfront. If the user already has a sudo
# session, sudo validate here will not prompt again, but will silently succeed.
sudo -v
if [ $? == 1 ]; then
echo 'You must enter an administrative password to use this script.'
exit 1
#! /bin/bash
## Useful for checking local chart dependencies before pushing the dependent
## chart local changes.
##
## Usage:
## ./package_dep.sh [MAIN_CHART_PATH] [DEP_CHART_PATH] <[DEP_PACKAGE_VERSION | 0.1.0]>
package_dep() {
INSTALLED_GO=false
@scottrigby
scottrigby / README-Template.md
Created December 5, 2017 05:27 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@scottrigby
scottrigby / raw_joke.sh
Last active January 20, 2018 04:36
Raw gist joke
#!/bin/bash
echo 'Why did the guy get fired from the orange juice factory?'; read ANSWER;
echo "He couldn’t concentrate! 🍊😂😭. But '${ANSWER}' is funny too."
@scottrigby
scottrigby / rbac-config.sh
Last active November 8, 2018 17:13
RBAC for Tiller script
#!/bin/sh
# See https://github.com/kubernetes/helm/blob/master/docs/rbac.md#tiller-and-role-based-access-control
echo 'apiVersion: v1
kind: ServiceAccount
metadata:
name: tiller
namespace: kube-system
---
@scottrigby
scottrigby / peacock-ssh-config.md
Last active January 31, 2018 15:30
Peacock ssh config

The under-documented Match keyword with this custom script solves the SSH issue on our VPN or any NBCU Proxy network because 3.3.172.116 will always be resolvable. See the Match section of the sshd_config man page.

Step-by-step for anyone interested:

  1. Install Homebrew if you don’t have it. It’s just one line in your terminal:

    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  2. brew install corkscrew

@scottrigby
scottrigby / Dockerfile
Created August 11, 2018 19:12
Example Composer deps for Bitnami Drupal image
FROM bitnami/drupal:8
# Allow user codebase to include a custom composer merge file.
# See https://github.com/wikimedia/composer-merge-plugin.
COPY merge-composer.json /opt/bitnami
RUN apt-get update && apt-get install -y jq
RUN cd /opt/bitnami/drupal \
&& tmp=$(mktemp) \
&& cat composer.json | jq '.extra."merge-plugin".include |= .+ ["../merge-composer.json"]' > "$tmp" \
&& mv "$tmp" composer.json \
@scottrigby
scottrigby / Dockerfile
Last active August 22, 2018 00:07
bitnami-drupal-composer-persistence
FROM bitnami/drupal:8
COPY custom-app-entrypoint.sh /
ENTRYPOINT ["/custom-app-entrypoint.sh"]
CMD ["/run.sh"]

Keybase proof

I hereby claim:

  • I am scottrigby on github.
  • I am r6by (https://keybase.io/r6by) on keybase.
  • I have a public key ASAX5QbeNWjrxE7mzyr1wbwlNJGNep29TnDJOJXvZwJvtQo

To claim this, I am signing this object:

@scottrigby
scottrigby / auto-dco.sh
Last active April 5, 2022 22:04
Add to ~/.bash_profile (or ~/.zshrc) to auto-sign git commits.
# Always signs commits for DCO (popularized by The Linux Foundation, required by
# most CNCF projects including Helm).
# See `git help commit`:
# > -s, --signoff
# > Add Signed-off-by line by the committer at the end of the commit log
# message. The meaning of a signoff depends on the project, but it typically
# certifies that committer has the rights to submit this work under the same
# license and agrees to a Developer Certificate of Origin (see
# http://developercertificate.org/ for more information).
git() {