Skip to content

Instantly share code, notes, and snippets.

View ipeacocks's full-sized avatar
🐕
Meow

Bruce ipeacocks

🐕
Meow
View GitHub Profile
name: pulumi-ecs-fargate
description: A container running in AWS ECS Fargate, using Python infrastructure as code
runtime: python
encryptionsalt: v1:Rz0nYmmptxM=:v1:r7UoJ9nQeSJUyvtU:ffIWgSSYSlfSrvD/JyFxLwZ+nkIhoQ==
config:
aws:region: us-east-1
encryptionsalt: v1:Rz0nYmmptxM=:v1:r7UoJ9nQeSJUyvtU:ffIWgSSYSlfSrvD/JyFxLwZ+nkIhoQ==
config:
aws:region: us-east-1
pulumi-infra-az:private_subnet_cidrs:
- 172.255.100.0/24
- 172.255.101.0/24
- 172.255.102.0/24
pulumi-infra-az:public_subnet_cidrs:
- 172.255.110.0/24
- 172.255.111.0/24
blueprint:
name: Temperature Calibration
description: Temperature calibration for Zigbee valve TS0601, according to external temperature sensor
domain: automation
input:
valve:
name: Smart Valve
selector:
entity:
domain: climate
from pulumi import export, ResourceOptions, Config, StackReference, get_stack
import pulumi_aws as aws
import json
# Read local config settings
config = Config()
# ---------------
@ipeacocks
ipeacocks / utils.py
Created May 21, 2020 19:52
utils.py
from pulumi_aws import get_availability_zones
def get_aws_az(amount):
zones = get_availability_zones()
return zones.names[:amount]
import pulumi
from pulumi_aws import ec2, get_availability_zones
import utils
# read local config settings
config = pulumi.Config()
private_subnet_cidrs = config.require_object("private_subnet_cidrs")
@ipeacocks
ipeacocks / dh-diagram.svg
Created April 27, 2019 20:21 — forked from Lewiscowles1986/dh-diagram.svg
SSH with asymmetric key UML Sequence
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ipeacocks
ipeacocks / curl.md
Created October 5, 2018 15:34 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@ipeacocks
ipeacocks / prometheus.md
Created July 26, 2018 08:30 — forked from petarnikolovski/prometheus.md
Prometheus 2.x installation on Ubuntu 16.04 server.

Installing Prometheus on Ubuntu 16.04

This gist is a compilation of two tutorials. You can find the original tutorials here and here. What should you know before using this? Everything can be executed from the home folder. For easier cleanup at the end you can make directory where you'll download everything, and then just use rm -rf .. Although, you should be careful. If some strange bugs arise unexpectedly somewhere sometimes, just keep in mind that some user names have underscores in them (this is probably nothing to worry about).

Create Users

sudo adduser --no-create-home --disabled-login --shell /bin/false --gecos "Prometheus Monitoring User" prometheus
sudo adduser --no-create-home --disabled-login --shell /bin/false --gecos "Node Exporter User" node_exporter
sudo adduser --no-create-home --disabled-login --shell /bin/false --gecos "Alertm