Skip to content

Instantly share code, notes, and snippets.

View scottrigby's full-sized avatar
🤓

Scott Rigby scottrigby

🤓
View GitHub Profile
@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"]
@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 / 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 / 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 / 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 / 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

#! /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 / 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
@scottrigby
scottrigby / k8s_charts_bump_dependency_version.sh
Last active September 3, 2017 18:31
kubernetes/charts dependency update script
#!/bin/bash
# @file
# See HELP().
# This script is useful until functionality is adopted into Helm.
#
# Follow @link https://github.com/kubernetes/helm/issues/1947 the issue. @endlink
# Define SCRIPT var for help and validation output.
SCRIPT=`basename ${BASH_SOURCE[0]}`
@scottrigby
scottrigby / plistGitDiff
Created January 7, 2017 22:16
Shows git diff of tracked plist files
#!/bin/bash
## @file
## Shows git diff of tracked plist files.
##
## Normally, Mac plist files are binary, so git diffs do not display. However,
## there are cases where seeing diffs is important. For example, when tracking
## changes via Mackup's git storage option.
##
## @see http://confusatory.org/post/133141617492/git-diff-for-binary-apple-property-list-files