Skip to content

Instantly share code, notes, and snippets.

@xinau
xinau / main.tf
Created April 6, 2020 23:25
Terraform resources for a remote backend on AWS using a S3 bucket (with logging and enforced server side encryption) and a DynamoDB table.
variable bucket {
description = "AWS S3 bucket name to use for state storage"
type = string
}
variable dynamodb_table {
description = "AWS DynamoDB table name to use for state locking"
type = string
}
@xinau
xinau / Dockerfile
Last active November 12, 2022 05:35
configuring mtail as a node-level logging-agent on kubernetes
FROM debian:stable AS builder
ENV MTAIL_VERSION=3.0.0-rc33
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl && \
curl -LsS -O https://github.com/google/mtail/releases/download/v${MTAIL_VERSION}/mtail_v${MTAIL_VERSION}_linux_amd64 && \
mv mtail_v${MTAIL_VERSION}_linux_amd64 /usr/bin/mtail && \
chmod 755 /usr/bin/mtail
@xinau
xinau / canvas.html
Last active March 22, 2020 11:06
d3.js horizon chart standalone
<!doctype html>
<head>
<meta charset="utf-8">
</head>
<body>
<div id="graph"></div>
<script src="https://d3js.org/d3.v5.min.js"></script>
<script>
(async () => {
overlap = 5
@xinau
xinau / image.json
Created January 20, 2019 14:37
packer inspec.io docker target
{
"variables": {
"host": "default"
},
"builders": [
{
"type": "docker",
"image": "debian:latest",
"commit": "true",
"run_command": [