Skip to content

Instantly share code, notes, and snippets.

@mindw
mindw / postgres-brew.md
Created February 22, 2022 08:33 — forked from ibraheem4/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
# display VPC ID, CIDR Block and Name
aws ec2 --output text --query 'Vpcs[*].{VpcId:VpcId,Name:Tags[?Key==`Name`].Value|[0],CidrBlock:CidrBlock}' describe-vpcs
@mindw
mindw / empty_bucket.sh
Created July 30, 2019 13:13 — forked from wknapik/empty_bucket.sh
Empty an s3 bucket of all object versions and delete markers in batches of 1000
#!/usr/bin/env bash
set -eEo pipefail
shopt -s inherit_errexit >/dev/null 2>&1 || true
if [[ ! "$#" -eq 2 || "$1" != --bucket ]]; then
echo -e "USAGE: $(basename "$0") --bucket <bucket>"
exit 2
fi
@mindw
mindw / Jenkinsfile
Created January 30, 2019 15:02 — forked from mikesplain/Jenkinsfile
Jenkins kubernetes dind
podTemplate(label: 'mypod', containers: [
containerTemplate(name: 'docker', image: 'docker:dind', ttyEnabled: true, alwaysPullImage: true, privileged: true,
command: 'dockerd --host=unix:///var/run/docker.sock --host=tcp://0.0.0.0:2375 --storage-driver=overlay')
],
volumes: [emptyDirVolume(memory: false, mountPath: '/var/lib/docker')]) {
node ('mypod') {
stage 'Run a docker thing'
container('docker') {
stage 'Docker thing1'
@mindw
mindw / calico.json
Last active April 20, 2018 11:43 — forked from zihaoyu/calico.json
Calico (Canal) grafana (5.0) dashboard WIP
{
"__inputs": [
{
"name": "DS_PROM-V1",
"label": "prom-v1",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
@mindw
mindw / prepull.yaml
Last active December 17, 2017 17:58 — forked from itaysk/prepull.yaml
Kubernetes: Pre-pull images into node
apiVersion: apps/v1beta1
kind: DaemonSet
metadata:
name: prepull
spec:
selector:
matchLabels:
name: prepull
template:
metadata:
@mindw
mindw / node-exporter
Last active October 2, 2023 06:27 — forked from wallentx/node-exporter
node-exporter init script for Amazon AMI/RHEL to be used with systemd. Place in /etc/init.d/ and ensure that line 12 matches your path
#!/bin/bash
#
#
#
# Start on runlevels 3, 4 and 5. Start late, kill early.
# chkconfig: 345 95 05
#
#
#!/bin/bash
@mindw
mindw / pr.md
Created October 20, 2016 07:05 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

python -c "from random import choice; print ''.join([choice('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%^*(-_=+)') for i in range(32)])"