Skip to content

Instantly share code, notes, and snippets.

View alloydwhitlock's full-sized avatar

Adam Whitlock alloydwhitlock

View GitHub Profile
@nikialeksey
nikialeksey / dependency-report.gradle
Created June 28, 2018 03:44
Gradle: multi-project dependency graph (supports depth > 2, supports gradle 4.4+)
// Inspired by https://gist.github.com/tzachz/419478fc8b009e953f5e5dc39f3f3a2a
// Task creates a .dot file with all inter-module dependencies
// Supports any depth of nested modules
task moduleDependencyReport {
doLast {
def file = new File("project-dependencies.dot")
file.delete()
file << "strict digraph {\n"
file << "splines=ortho\n"
@kevin-smets
kevin-smets / 1_kubernetes_on_macOS.md
Last active January 6, 2024 22:04
Local Kubernetes setup on macOS with minikube on VirtualBox and local Docker registry

Requirements

Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:

sysctl -a | grep machdep.cpu.features | grep VMX

If there's output, you're good!

Prerequisites

@elithrar
elithrar / use.go
Last active January 5, 2023 11:19
go/use: Little middleware chains that could. Inspired by comments here: https://github.com/gorilla/mux/pull/36
r := mux.NewRouter()
// Single handler
r.HandleFunc("/form", use(http.HandlerFunc(formHandler), csrf, logging)
// All handlers
http.Handle("/", recovery(r))
// Sub-routers
apiMiddleware := []func(http.Handler) http.Handler{logging, apiAuth, json}