Skip to content

Instantly share code, notes, and snippets.

@BastienM
BastienM / post-install.ps1
Created January 20, 2021 10:09
Simple Powershell script to clean up Microsoft apps and install your own with Chocolatey
#Requires -RunAsAdministrator
$installApplications = @(
"adb"
"aimp"
"authy-desktop"
"bitwarden"
"blackbird"
"chocolateygui"
"chromium"
# environment & region oriented structure
|-- int
| |-- eu-west-1
| | |-- app_a
| | |-- app_b
| | \-- vpc
| |-- eu-west-3
| | |-- app_a
| | |-- app_b
| | \-- vpc
# Simple module to enforce our naming convention
module "msk_names" {
source = "git::ssh://git@our-awesome-vcs.com/terraform-modules/naming.git?ref=v2.0.0"
region = var.aws_region
environment = var.environment
type = var.type
project = var.project
component = "msk"
owner = var.owner
}
module "vpc" {
source = "terraform-aws-modules/vpc/aws"
name = "production"
cidr = "10.0.0.0/16"
azs = ["eu-west-1a", "eu-west-1b", "eu-west-1c"]
private_subnets = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"]
public_subnets = ["10.0.101.0/24", "10.0.102.0/24", "10.0.103.0/24"]
# if you are using AWS
data "aws_ami" "myapp" {
owners = [ "self" ]
name = "myapp"
filter {
name = "tag:Version"
values = [ "v1.0" ]
}
}
data_sources:
- cdrom
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABBwCkqvVtPKWg7OyoBpwiOmP44bxKsH3NAvisPpA/mPk9OCpJnMd5dfxyfZPAGW5zmEBdW4GA8vaGzsm+se8I70500DpqP/S/+rCl7sXgAGdjvKOuGCUzyP3oN1plf+RKC9ZPDSJj8tuNrswFPzk5+PWPhYs11yPEx3Sa6qBecSezllSlMwXEqpFMiTxXXWPdWXxmLO10gA+Maizb6PAFMDoD8n9CQ7eE1LPTSTAi2R8EWiUfUlW9Vcb1WUWSe+eZWhyGQbGRbJuteRQO/S7UlwXoKKHrbnXphujmBIWBiHQktszgQPhLPcSwoAc6Cs2CrKZGYx4WT9SzD6Cx5qM4S5Y+kzvpaYxZ
k3os:
modules:
- kvm
dns_nameservers:
- 192.168.1.254
# --------------------------
# Zprezto loading
# --------------------------
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
fi
# --------------------------
# Zsh settings
# --------------------------
@BastienM
BastienM / debug.txt
Created February 17, 2017 14:48
lookup doesn't like interpolation in the first arg
2017/02/17 15:47:15 [INFO] Terraform version: 0.8.1 a54c3478b456502c19be675c17eb58309808ebc1
2017/02/17 15:47:15 [INFO] CLI args: []string{"C:\\Users\\44026729\\Tools\\bin\\terraform.exe", "apply"}
2017/02/17 15:47:15 [DEBUG] Attempting to open CLI config file: C:\Users\44026729\AppData\Roaming\terraform.rc
2017/02/17 15:47:15 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
onfigVariable
output.B - *terraform.GraphNodeConfigOutput
var.mesComptes_cpu_alert - *terraform.GraphNodeConfigVariable
output.C - *terraform.GraphNodeConfigOutput
var.alerts_list - *terraform.GraphNodeConfigVariable
var.alerts_list - *terraform.GraphNodeConfigVariable
@BastienM
BastienM / docker-compose.yml
Last active February 7, 2017 13:50
untested docker-compose skeleton for web hosting using Docker
# made by /u/HellowFR, for /u/shubhank008/ Homelab subreddit
version: "3"
services:
ftp:
image: fauria/vsftpd
container_name: "ftp_username"
restart: always
environment:
FTP_USER="username"
@BastienM
BastienM / TrueColour.md
Created November 23, 2016 22:18 — forked from XVilka/TrueColour.md
True Colour (16 million colours) support in various terminal applications and terminals

Colours in terminal

It's a common confusion about terminal colours... Actually we have this:

  • plain ascii
  • ansi escape codes (16 colour codes with bold/italic and background)
  • 256 colour palette (216 colours + 16 ansi + 24 gray) (colors are 24bit)
  • 24bit true colour ("888" colours (aka 16 milion))
printf "\x1b[${bg};2;${red};${green};${blue}m\n"