Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View BondAnthony's full-sized avatar
👋
Hi!

AJ BondAnthony

👋
Hi!
View GitHub Profile
@BondAnthony
BondAnthony / main.go
Last active November 27, 2021 01:36
Exponential backoff sample code written in Go.
package main
import (
"fmt"
"math/rand"
"time"
"github.com/cenkalti/backoff/v4"
)
@BondAnthony
BondAnthony / wall-connector-influxdb.yaml
Last active October 7, 2023 07:45
Tesla Wall Connector
apiVersion: influxdata.com/v2alpha1
kind: Variable
metadata:
name: wizardly-northcutt-83c00b
spec:
associations:
- kind: Label
name: frosty-hamilton-83c001
name: kwh_price
description: Price per kilowatt-hour

Jaeger all in one

This will create a jaeger all in one deployment enabling zipkin and setting a sampling rules.

#
# Copyright 2017-2019 The Jaeger Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
@BondAnthony
BondAnthony / terraform-actions.md
Last active November 12, 2020 15:56
Terraform monorepo actions

Terraform + Github Actions

I struggled to get the right mix of github actions to lint my terraform modules within a monorepo. Here is the configuration I settled on which dynamically creates new jobs based on the data within the project.

I use a module naming pattern of provider-module_name, which becomes aws-kubernetes or gcp-gke. This information is important because the action executes the following command to create a list of modules.

$(printf '\"%s\"', gcp-* aws-* azure-* | sed 's/,$//')
@BondAnthony
BondAnthony / unifi.md
Created August 16, 2020 19:17
Unifi Controller

Unifi Controller

Load your own certificate into Unifi

java -jar /usr/lib/unifi/lib/ace.jar import_key_cert tls.key tls.pem
@BondAnthony
BondAnthony / openssl.md
Created June 9, 2020 00:56
The fun of openssl

All those OpenSSL commands

Pull certificates for a domain

openssl s_client -showcerts -connect abond.dev:443

Add the following flag to run SNI negotiation.

 -servername abond.dev
@BondAnthony
BondAnthony / github-api.md
Last active May 22, 2020 14:37
Github GraphQL

Github API

Queries to return issues based on milestone

Variables

{
  "owner": "bondanthony",
  "name": "ansible-plays"
}

Keybase proof

I hereby claim:

  • I am bondanthony on github.
  • I am bondanthony (https://keybase.io/bondanthony) on keybase.
  • I have a public key whose fingerprint is D41B 91E6 A7E5 06B6 8F9E F1B2 3041 BB87 8C89 EF7D

To claim this, I am signing this object:

@BondAnthony
BondAnthony / Random.md
Created November 14, 2019 16:03
Random stuff I can't remember

CoreOS

Toolbox for CoreOS

docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock --net=host  nicolaka/netshoot ctop
@BondAnthony
BondAnthony / PostgreSQL.md
Created October 17, 2019 19:32
PostgreSQL

PostgreSQL

Easy way to interact with a database

docker run -it --rm postgres psql -h hostname -U user