Skip to content

Instantly share code, notes, and snippets.

View emanb29's full-sized avatar

Ethan Bell emanb29

View GitHub Profile
{
"openapi": "3.0.0",
"paths": {},
"servers": [
{"url": "http://localhost:8080"},
{"url": "https://saas.dev.thatdot.com/api/v1/quines/emanb29/prose"}
]
"components": {
"schemas": {
"com.thatdot.quine.routes.UiNodeLabel": {
@emanb29
emanb29 / FooEvent.proto
Last active August 3, 2021 21:34
FooEvent
syntax = "proto3";
package tutorial;
message FooEvent {
string customer_id = 1;
string sensor_id = 2;
string field1 = 3;
string field2 = 4;
}
@emanb29
emanb29 / Clock.scala
Last active July 18, 2020 06:37
Computers are clocks that sometimes do things
import Clock.Message
import akka.actor.typed.{ActorRef, Behavior}
import akka.actor.typed.scaladsl.{AbstractBehavior, ActorContext}
import scala.collection.mutable
object Clock {
sealed trait Message
/**
@emanb29
emanb29 / caddy-tls-rotator.md
Created July 15, 2020 20:50
Instructions for setting up Caddy as a TLS rotator

Deploying HTTPS rotator with wildcard support

Assume we're trying to get renewing certificates for my.domain.com and *.my.domain.com

IAM Role

Create an IAM role with permissions like the following (from https://github.com/libdns/route53):

Replace ZONEIDHEREABCDEFG with the zone ID of the route53 zone associated with my.domain.com

{
    "Version": "2012-10-17",
    "Statement": [
@emanb29
emanb29 / pakcs.sh
Last active June 9, 2020 06:36
Caups/pakcs2 dockerfile assistant script (git-for-windows compatible)
#!/bin/sh
# shell script to run the Docker image caups/pakcs2
# with appropriate options in order to use PAKCS
# with local files and invoke tools contained in the image
export MSYS_NO_PATHCONV=1
# set docker options:
# run interactive, remove container after execution
DOCKEROPTS="-it --rm"
@emanb29
emanb29 / CYPHER-CTI.md
Last active July 10, 2024 21:29
Cypher generating MITRE ATTACK Enterprise CTI

This gist contains the following files:

  • NOTICE.md Attributions
  • attack1k.cypher A cypher script generating a subset of the Enterprise CTI data (about 1k nodes)
  • attacksm.cypher A cypher script generating a subset of the Enterprise CTI data (about 500 nodes)
  • attacklg.cypher A cypher script generating a subset of the Enterprise CTI data (about 18k nodes)
@emanb29
emanb29 / DepTypedNats.scala
Created March 12, 2019 20:04
Dotty Natural Numbers Proofs Using Dependent Types
object Main extends App {
type Nat
type Zero <: Nat
type Succ[N <: Nat] <: Nat
type One = Succ[Zero]
type NonZero[X <: Nat] = X match {
case Zero => Zero
case Succ[_] => Succ[Zero]

Keybase proof

I hereby claim:

  • I am emanb29 on github.
  • I am emanb29 (https://keybase.io/emanb29) on keybase.
  • I have a public key ASAi3giSi0RNewhCcufNlnIon8vbLFbNtM6G_6ZiFUrstAo

To claim this, I am signing this object:

@emanb29
emanb29 / Material Design Login Form.markdown
Created May 22, 2015 05:37
Material Design Login Form