View .pre-commit-hooks.yaml
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
- id: deny-todos | |
name: Denies TODOs or FIXME | |
description: 'Denies TODOs or FIXME in commits' | |
entry: run.sh | |
language: script |
View tf-aws-multiaz-vpc-w-az-cache.tf
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
provider "aws" { | |
region = "us-west-2" | |
profile = "md-sandbox" | |
} | |
resource "aws_s3_bucket" "dont_create_me_in_same_script_obvi" { | |
bucket = "terraform-provisioning-cache" | |
acl = "private" | |
} |
View kratos.ex
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
defmodule Kratos do | |
defmodule Behaviour do | |
@moduledoc """ | |
Defines function signature for secrets adapters | |
""" | |
@callback who_am_i(String.t()) :: {:ok, map()} | {:error, :unauthenticated} | |
end | |
@behaviour Kratos.Behaviour |
View docker-compose.yaml
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
--- | |
version: "3" | |
networks: | |
local-dev: | |
driver: bridge | |
--- | |
version: "3" | |
services: | |
shell: | |
image: busybox |
View find-no-match.sh
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 | |
# This uses the silver searcher (ag) | |
TMP_FILE=$(mktemp) | |
# find :ok tuples w/ no error match | |
ag "^\s{0,}\{:ok.*\s=" --ignore 'test' -G '.ex$' . > ${TMP_FILE} | |
# find :ok left side matches w/ no error handling | |
ag "^\s{0,}:ok.*=" --ignore 'test' -G '.ex$' . >> ${TMP_FILE} |
View slack-text-to-emoji.sh
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
# annoy emoji-name your message here | |
annoy() { | |
emoji=$1 | |
msg="${@:2}" | |
figlet -f banner $msg | sed -e"s/#/:$emoji:/g" | sed -e's/ /:blank:/g' | pbcopy | |
} |
View list.txt
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
NAME TITLE | |
abusiveexperiencereport.googleapis.com Abusive Experience Report API | |
acceleratedmobilepageurl.googleapis.com Accelerated Mobile Pages (AMP) URL API | |
accessapproval.googleapis.com Access Approval API | |
accesscontextmanager.googleapis.com Access Context Manager API | |
actions.googleapis.com Actions API | |
adexchangebuyer-json.googleapis.com Ad Exchange Buyer API | |
adexchangebuyer.googleapis.com Ad Exchange Buyer API II | |
adexchangeseller.googleapis.com Ad Exchange Seller API | |
adexperiencereport.googleapis.com Ad Experience Report API |
View terraform-state-demo.files
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
==> ./module <== | |
==> ./module/main.tf <== | |
variable "msg" {} | |
resource "null_resource" "goodbye" { | |
provisioner "local-exec" { | |
command = "echo ${var.msg}" | |
} | |
} | |
==> ./main.tf <== |
View find_unused_routes.rb
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
require "action_dispatch" | |
require "json" | |
# RIP your CPU if you have a lot of traffic. Check out the parallel gem w/ multiple processes to speed this up. | |
list_of_url_paths_visited = File.readlines("list_of_url_paths_visited.txt", chomp: true) | |
# YMMV | |
# the 2nd or 3rd column will be the path w/ awk | |
rake_routes_paths = `rake routes | awk '{if ($2 ~ /\\//) {print $2} else if ($3 ~ /\\//) {print $3}}'`.split("\n") | |
View task.json
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
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "plantuml.export", | |
"command": "${command:plantuml.exportCurrent}" | |
}, | |
{ | |
"label": "generate diagrams", | |
"type": "shell", |
NewerOlder