- https://simonfredsted.com/1459?utm_source=webopsweekly&utm_medium=email
- https://heap.engineering/terraform-gotchas/
- https://www.contino.io/insights/top-3-terraform-testing-strategies-for-ultra-reliable-infrastructure-as-code
- https://sgoel.org/posts/experiences-using-terraform/
- http://engineering.rallyhealth.com//jekyll/update/2017/02/15/immutable-infrastructure-w-terraform-and-windows.html
- https://charity.wtf/2016/04/14/scrapbag-of-useful-terraform-tips/
- https://medium.com/@simonvc/terraform-securely-5ec34d294782
- https://segment.com/blog/rebuilding-our-infrastructure/
- http://engineering.rallyhealth.com/jekyll/update/2017/02/15/immutable-infrastructure-w-terraform-and-windows.html
- https://www.thoughtworks.com/insights/blog/implementing-blue-green-deployments-aws
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# https://gist.github.com/gretel/34008d667a8a243a9682e5207619ad95 | |
# 2016 tom hensel <[email protected]> | |
# `vagrant` on `ubuntu-16.04` can get in conflict with *unattended-upgrade* running and locking the `dpkg` subsystem. this script waits gracefully | |
# in `Vagrantfile`: | |
# config.vm.provision 'Wait for unattended-upgrades', type: 'shell', path: './provisioning/wait_unattended_upgrades.sh', args: %w( dpkg apt unattended-upgrade ) | |
# | |
function wait_procnames { | |
while true; do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: legacyservers | |
gather_facts: yes | |
become: yes | |
tasks: | |
# Use a block to perform tasks conditionally—only if running Ubuntu 18.04. | |
- block: |
Inspired By: grafana/loki#333
- docker-compose.yml
version: "3"
networks:
loki:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) create a file squid.conf | |
``` | |
acl denydomain dstdomain .bbc.com | |
http_access deny denydomain | |
acl allowdomain dstdomain .yahoo.com | |
http_access allow allowdomain | |
http_access deny all |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"openapi": "3.0.0", | |
"tags": [ | |
{ | |
"name": "Open Service Broker API Specification" | |
} | |
], | |
"info": { | |
"title": "Open Service Broker API", | |
"description": "The Open Service Broker API defines an HTTP(S) interface between Platforms and Service Brokers.", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Decode a JWT from stdin and verify it's signature with the JWT issuer public key | |
# Only RS256 keys are supported for signature check | |
# | |
# Put OAuth server public key in PEM format to /var/cache/oauth/$JWT_KID.key.pub.pem | |
# You must create the folder first | |
# $ sudo mkdir -p /var/cache/oauth/ | |
# To converted key from JWK to PEM use https://8gwifi.org/jwkconvertfunctions.jsp or https://keytool.online/ | |
# NOTE: For Google you can get the keys in PEM format via https://www.googleapis.com/oauth2/v1/certs | |
# Decode the keys with decodeURIComponent() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/ash | |
# Usage: cat /id_token.txt | jwt-decode.sh --no-verify-sig" > jwt_payload.json | |
. /usr/share/libubox/jshn.sh | |
base64_padding() | |
{ | |
local len=$(( ${#1} % 4 )) | |
local padded_b64='' | |
if [ ${len} = 2 ]; then | |
padded_b64="${1}==" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt-get remove --purge $(grep -A 3 "$1" /var/log/apt/history.log | tail -1 | sed 's/Install: //' | tr ',' '\n' | sed '/automatic)/d' | awk '{ print $1}' | sed 's/:amd64//') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.0.0 | |
info: | |
title: Hashicups | |
description: Products API allows access to HashiCoffee Coffees and Ingredients | |
version: 1.0.0 | |
servers: | |
- url: http://{{baseurl}} | |
components: | |
securitySchemes: | |
noauthAuth: |