This file contains 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
@fixture(scope="session") | |
def exposer_thread(request): | |
start_exposer_thread() | |
def close(): | |
stop_exposer_thread() | |
request.addfinalizer(close) |
This file contains 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
# file: tests/api_helpers.py | |
import logging | |
import threading | |
from copy import deepcopy | |
from threading import Thread | |
from typing import Optional | |
from uuid import uuid4 | |
import requests |
This file contains 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 | |
set -eu | |
dumpInstances() { | |
local readonly region="$1" | |
local readonly date_ts="$(date +%Y%m%d-%H%M)" | |
aws ec2 describe-instances \ | |
--max-items 200 \ |
This file contains 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 | |
set -eu | |
dumpInstances() { | |
local readonly region="$1" | |
local readonly date_ts="$(date +%Y%m%d-%H%M)" | |
aws ec2 describe-instances \ | |
--max-items 200 \ |
This file contains 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 | |
set -euo pipefail | |
IFS=$'\n\t' | |
#/ Description: | |
#/ Run Terraform fmt on nomad file to format HCL, and update the file in place. | |
#/ | |
#/ Arguments: | |
#/ $1 the nomad flie | |
#/ --diff if set, then do not write the changes, but show the diff between current and cacnonical format |
This file contains 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
/* Github */ | |
@import url(https://cdn.rawgit.com/tonsky/FiraCode/1.204/distr/fira_code.css); | |
.blob-code-inner, | |
.markdown-body .highlight pre, | |
.markdown-body pre, tt, code { | |
font-family: "Fira Code","SFMono-Regular",Consolas,"Liberation Mono",Menlo,Courier,monospace; | |
font-feature-settings: "calt" 1; | |
font-variant-ligatures: contextual; |
This file contains 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
/* Bitbucket */ | |
@import url(https://cdn.rawgit.com/tonsky/FiraCode/1.204/distr/fira_code.css); | |
/* Bitbucket code and diffs */ | |
.refract-content-container .line-numbers, | |
.refract-content-container .source { | |
font-family: 'Fira Code'; | |
} |
This file contains 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 | |
set -e | |
# Note: this will overwite your AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY if you use it | |
# (I usually prefer using ~/.aws/credentials profile and leave those unset) | |
# Use this script by sourcing the output directly, like: | |
# $(./aws_mfa_auth.sh) | |
# Or | |
# $(./aws_mfa_auth.sh arn:aws:iam::123456789012:mfa/bob) |
This file contains 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
# ---- BYTES | |
# HELP bytes_received The total number of bytes received. | |
# TYPE bytes_received counter | |
bytes_received{node="nodeName"} 8504294780 | |
# HELP bytes_sent The total number of bytes sent. | |
# TYPE bytes_sent counter | |
bytes_sent{node="nodeName"} 7981953590 | |
# ---- CLIENT |
This file contains 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
# Potential resolvers: | |
# AWS VPC (should be the default): 169.254.169.253 | |
# AWS EC2 classic (goes out of VPC): 172.16.0.23 | |
# Google global DNS: 8.8.8.8 | |
# Quad9 DNS: 9.9.9.9 | |
# Cloudflare's 1⁴ : 1.1.1.1 / 1.0.0.1 | |
resolver 169.254.169.253; |