Skip to content

Instantly share code, notes, and snippets.

View syntaqx's full-sized avatar
🤷
¯\_(ツ)_/¯

Chase Pierce syntaqx

🤷
¯\_(ツ)_/¯
View GitHub Profile
@syntaqx
syntaqx / main.go
Created April 11, 2019 19:24
Service Object
// https://github.com/romanyx/service_object
// https://github.com/romanyx/service_object/pull/4/files
package main
import (
"context"
"encoding/json"
"flag"
"fmt"
"io"
@syntaqx
syntaqx / docker-compose.yml
Created April 17, 2019 02:44
Swagger UI PathPrefix patches for Traefik
version: '3.3'
services:
apidocs:
image: swaggerapi/api-ui
environment:
API_URL: http://api.example.com/swagger.json
ports:
- 8080
labels:
@syntaqx
syntaqx / cloud-config.yml
Created April 17, 2019 16:58
CoreOS Docker Swarm
#cloud-config
hostname: ${hostname}
write_files:
- path: /etc/systemd/system/update-engine.service.d/proxy.conf
content: |
[Service]
Environment=HTTPS_PROXY=http://proxy.example.com:1234
resource "digitalocean_firewall" "web" {
name = "test-firewall"
droplet_ids = ["${digitalocean_droplet.web.id}"]
inbound_rule {
protocol = "icmp"
source_addresses = ["0.0.0.0/0", "::/0"]
}
inbound_rule {
@syntaqx
syntaqx / infra-secret-management-overview.md
Created April 30, 2019 23:52 — forked from maxvt/infra-secret-management-overview.md
Infrastructure Secret Management Software Overview

Currently, there is an explosion of tools that aim to manage secrets for automated, cloud native infrastructure management. Daniel Somerfield did some work classifying the various approaches, but (as far as I know) no one has made a recent effort to summarize the various tools.

This is an attempt to give a quick overview of what can be found out there. The list is alphabetical. There will be tools that are missing, and some of the facts might be wrong--I welcome your corrections. For the purpose, I can be reached via @maxvt on Twitter, or just leave me a comment here.

There is a companion feature matrix of various tools. Comments are welcome in the same manner.

@syntaqx
syntaqx / shlib.sh
Last active May 30, 2019 09:45
shlib function easily downloadable gist
#!/bin/bash
set -e
cat /dev/null <<EOF
------------------------------------------------------------------------
https://github.com/client9/shlib - portable posix shell functions
Public domain - http://unlicense.org
https://github.com/client9/shlib/blob/master/LICENSE.md
but credit (and pull requests) appreciated.
------------------------------------------------------------------------
@syntaqx
syntaqx / 1.swarm-api.service
Last active May 30, 2019 09:44
Interfacing with systemd for a basic binary service.
[Unit]
Description=A dead simple REST API for Docker Swarm
Documentation=https://github.com/syntaqx/swarm-api
After=network.target
[Service]
Type=simple
Restart=always
RestartSec=5s
Environment=PORT=8080
@syntaqx
syntaqx / box-sizing.css
Last active May 30, 2019 09:44
Useful Bootstrap Snippets
*,
::after,
::before {
box-sizing: border-box
}
@syntaqx
syntaqx / 0.12.0.tf
Last active May 26, 2020 17:51
Terraform v0.12.0 Using variables dynamically in resources hack until we get for_each. Only works for sets of 2 as implemented.
variable "nodes" {
type = map(object({
size = string
count = number
}))
default = {
manager = {
size = "s-1vcpu-1gb"
count = 1
}
@syntaqx
syntaqx / clone.sh
Created May 27, 2019 18:27
Clone all of the projects for a given user or organization.
#!/bin/bash
# Simple helper script that iterates over available repositories and clones them down.
# I know it could use some work.
export USER=syntaqx
curl -u $GITHUB_TOKEN:x-oauth-basic 'https://api.github.com/orgs/$USER/repos?per_page=100' | jq '.[].ssh_url' -r | while read url; do git clone "$url"; done