Skip to content

Instantly share code, notes, and snippets.

View full-sized avatar
☘️
O'Internets

Cory O'Daniel coryodaniel

☘️
O'Internets
View GitHub Profile
@coryodaniel
coryodaniel / list.txt
Created May 13, 2020 22:04
GCP List of API Services
View list.txt
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
@coryodaniel
coryodaniel / k8s.Makefile
Last active August 9, 2023 23:37
A makefile for doing common things with kubectl
View k8s.Makefile
##################################################
## A makefile for doing common things with kubectl
##################################################
ifndef K8S_PROJECT_NAME
$(error K8S_PROJECT_NAME is not set. Please set this to your k8s project namein YOUR Makefile)
endif
UNAME_S := $(shell uname -s)
STAGING_NAMESPACE = staging-${K8S_PROJECT_NAME}
@coryodaniel
coryodaniel / block.tf
Last active June 24, 2023 04:17
Optional dynamic blocks in terraform
View block.tf
variable "gpu" {
description = "Enable and configure node GPUs"
type = object({
type = string
count = number
})
default = null
# or...
@coryodaniel
coryodaniel / .pre-commit-hooks.yaml
Last active July 9, 2022 22:43 — forked from athiththan11/pre-commit
Git Pre Commit Hook for FIXME TODO
View .pre-commit-hooks.yaml
- id: deny-todos
name: Denies TODOs or FIXME
description: 'Denies TODOs or FIXME in commits'
entry: run.sh
language: script
@coryodaniel
coryodaniel / heroku_name_generator.ex
Created December 16, 2017 23:48
Heroku Style Name Generator in Elixir
View heroku_name_generator.ex
defmodule Name do
@adjectives ~w(
autumn hidden bitter misty silent empty dry dark summer
icy delicate quiet white cool spring winter patient
twilight dawn crimson wispy weathered blue billowing
broken cold damp falling frosty green long late lingering
bold little morning muddy old red rough still small
sparkling throbbing shy wandering withered wild black
young holy solitary fragrant aged snowy proud floral
restless divine polished ancient purple lively nameless
@coryodaniel
coryodaniel / scanner.sh
Created March 10, 2020 03:32 — forked from andyrbell/scanner.sh
Make a pdf look scanned using ImageMagick
View scanner.sh
# use ImageMagick convert
# the order is important. the density argument applies to input.pdf and resize and rotate to output.pdf
convert -density 90 input.pdf -rotate 0.5 -attenuate 0.2 +noise Multiplicative -colorspace Gray output.pdf
@coryodaniel
coryodaniel / tf-aws-multiaz-vpc-w-az-cache.tf
Created November 16, 2021 22:14
Create multi-az VPC in AWS w/ Terraform and _not_ specifying individual zones
View tf-aws-multiaz-vpc-w-az-cache.tf
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"
}
@coryodaniel
coryodaniel / kratos.ex
Created August 23, 2021 18:40
Kratos Sessions whoami client for elixir
View kratos.ex
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
@coryodaniel
coryodaniel / hello-world-pod-2.yaml
Last active July 16, 2021 03:07
Newbernetes hello world pod (sh/http)
View hello-world-pod-2.yaml
apiVersion: v1
kind: Pod
metadata:
name: hello-world-pod-2
labels: # You'll use labels A LOT w/ kube
app: hello-world # They are useful for organizing and identifying attributes of an object
spec:
containers: # This spec has multiple containers, how fancy!
- name: hello-world-sh
image: busybox
@coryodaniel
coryodaniel / job.yaml
Created June 16, 2017 21:08
Perl Pi Job Kubernetes
View job.yaml
apiVersion: batch/v1
kind: Job
metadata:
name: pi
spec:
template:
metadata:
name: pi
spec:
containers: