Skip to content

Instantly share code, notes, and snippets.

Ron Amosa ronamosa

  • Auckland, New Zealand
Block or report user

Report or block ronamosa

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ronamosa
ronamosa / postgresql-pv.yaml
Created Aug 9, 2019
PostgreSQL persistentVolume.yaml
View postgresql-pv.yaml
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
kind: PersistentVolume
apiVersion: v1
metadata:
name: pv-{{ template "postgresql.name" . }}-data
labels:
app: {{ template "postgresql.name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
@ronamosa
ronamosa / sonarqube-pv.yaml
Last active Aug 9, 2019
SonarQube persistentVolume.yaml
View sonarqube-pv.yaml
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
kind: PersistentVolume
apiVersion: v1
metadata:
name: pv-{{ template "sonarqube.name" . }}-data
labels:
app: {{ template "sonarqube.name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
View install-docker_ce-ubuntu.sh
#!/usr/bin/env bash
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
apt-cache policy docker-ce
sudo apt-get install -y docker-ce
sudo systemctl status docker
View aws_list_all_ec2
#!/usr/bin/env bash
# description: lists EC2 instances in ALL regions.
# credit: https://github.com/aws/aws-cli/issues/1777
for region in `aws ec2 describe-regions --query Regions[*].[RegionName] --output text`
do
echo -e "\nListing Instances in region:'$region'..."
aws ec2 describe-instances --region $region
done
@ronamosa
ronamosa / cli.txt
Last active Dec 9, 2017
handy command line snippets
View cli.txt
# description:
# inserts a new field after an existing field in a yaml file
# scenario:
# needed to add "comments: true" to all my github page blog posts (*.md)
# explain:
# -i = edit file in place
# -e = regex
# 's = substitute
# find this "/published\:\ true/"
# replace with this "/published\:\ true/"
You can’t perform that action at this time.