Skip to content

Instantly share code, notes, and snippets.

View wsl2-setup-config.ps1
## Enable hyper-v and wsl
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform -NoRestart
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux -NoRestart
## Download distro of choice (
Invoke-WebRequest -OutFile ubuntu-18-04.appx -UseBasicParsing
Add-AppxPackage .\ubuntu-18-04.appx
Staggerlee011 /
Last active Dec 4, 2020
Terraform template to create a secure s3 bucket, dnamodb for state file
provider "aws" {
region = "eu-west-2"
profile = "xxx"
variable "env" {
description = "Name of AWS environment"
type = string
default = "xxx"
Staggerlee011 / install
Last active Apr 17, 2020
View install
# install brew
sudo apt install linuxbrew-wrapper
sudo apt install curl
## maunual download of chrome
## isntall vscode from snap
sudo apt install python3.8
sudo apt install python3-pip
View ubuntu-install
# install brew
/bin/bash -c "$(curl -fsSL"
## install k8s tools
brew install stern
brew install kube-ps1
brew install kubectx
brew install derailed/popeye/popeye
brew install derailed/k9s/k9s
curl --silent --location "$(uname -s)_amd64.tar.gz" | tar xz -C /tmp
Staggerlee011 / pg_admin
Created Mar 31, 2020
pg_admin container: http://localhost:65432/
View pg_admin
docker pull dpage/pgadmin4
docker run -p 65432:80 -e '' -e 'PGADMIN_DEFAULT_PASSWORD=SuperSecret' -d dpage/pgadmin4
View k8s-cheatsheet
## testing with busybox (runs interactive shell in busybox pod in your namespace. dies on exit.)
kubectl run -i --tty busybox --image=busybox --restart=Never -- sh
### in busybox command prompt you can test mysql connection with
<servicename> <seriveport>
View docker build
# scripts to build a dockerfile
docker build myapp:v2 .
Staggerlee011 / docker-compose
Last active Feb 18, 2020
docker-compose cheatsheet
View docker-compose
## run a docker-compose
docker-compose up
## run specific file
docker-compose -f /tests/docker-compose.yml up
## run detatched
docker-compose up -d
## run a single container from the docker-compose
View Linux Desktop Config (OpenSUSE with gnome)
## Primary Desktop Apps
sudo su -
zypper update
## zypper --non-interactive install PACKAGE_NAME
# power management tools
Staggerlee011 / Azure-DevOps-BuildTemplate-Folder-Example
Created Jun 3, 2019
Azure DevOps - Build - Calling a template in a folder
View Azure-DevOps-BuildTemplate-Folder-Example
- repository: templates #Name of repo
type: git
name: templates
- template: terraform/azureterraform.yml@templates # Name of folder (Terraform in the example) and name of file (azureterraform.yml in the example)