Skip to content

Instantly share code, notes, and snippets.

View aussielunix's full-sized avatar
🤠
G`Day

Mick Pollard aussielunix

🤠
G`Day
View GitHub Profile
# HELP
# This will output the help for each task
# thanks to https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
.PHONY: help
RANDOM := $(shell /bin/bash -c "cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 6 | head -n 1")
help: ## This help.
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
@aussielunix
aussielunix / nginx.conf
Created June 5, 2022 06:38
k3s nginx load balancer
user www-data;
pid /run/nginx.pid;
worker_processes auto;
worker_rlimit_nofile 40000;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 8192;
}
@aussielunix
aussielunix / vimrc
Created May 19, 2022 01:04
basic vimrc
syntax on
filetype plugin indent on
set shiftwidth=2
set tabstop=2
set nocompatible
set expandtab
set smarttab
set autoindent
set nu
@aussielunix
aussielunix / ceph-manual-install.md
Last active April 20, 2022 02:12 — forked from kalaspuffar/ceph-manual-install.md
How to install a manual ceph cluster.

Manual install of a Ceph Cluster.

Fetching software.

First of I want to check that I have all the latest packages in my debian system.

apt update
apt upgrade
@aussielunix
aussielunix / debug_vars.yml
Created October 29, 2021 22:09
Ansible playbook that prints out all vars available during a play
---
- name: dump all
hosts: all
gather_facts: false
tasks:
- name: debug | vars
debug:
var: vars
- name: debug | environment
@aussielunix
aussielunix / Makefile
Created August 8, 2021 00:38
A Makefile example with a help system
# HELP
# This will output the help for each task
# thanks to https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
.PHONY: help
help: ## This help.
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
.DEFAULT_GOAL := help
@aussielunix
aussielunix / Day0.md
Last active July 29, 2023 21:32
Runsheet for bootstrapping a clean MacOS M1 using https://github.com/geerlingguy/mac-dev-playbook

Day 0 - Bootstrap MacOS with Ansible

After factory resetting the maching you will need to do the following things to bootstrap it with Ansible.

  • Set default shell to bash chsh -s /bin/bash (optional)
  • Open the App Store and sign in (but do not install anything)
  • Install command line tools
    • xcode-select --install
  • Add Python 3.8 to the $PATH
  • export PATH="$HOME/Library/Python/3.8/bin:$PATH"
# Run a command and present a spiiner whilst it completes
#
apt-get update -qq & # important to background command
pid=$! # get PID of backgrounded task
spin[0]="-"
spin[1]="\\"
spin[2]="|"
spin[3]="/"
---
name: minio
releases:
- name: minio
version: latest
stemcells:
- alias: default
os: ubuntu-trusty
@aussielunix
aussielunix / FindYourUltimateJob.md
Last active January 20, 2019 18:25
A plan on how to find your ultimate job.

Exercise 1

  • write on post-its what you value most in a potential employer / work environment separated into three different personas.
    • As a member of the company I value:
    • As a member of a team I value:
    • As an individual worker I value:
  • group these into a small set of high level values
  • discard the individual post-its