Skip to content

Instantly share code, notes, and snippets.

View developer-guy's full-sized avatar
🐾
Every artifact can be verifiably traced to Source Code and Hardware

Batuhan Apaydın developer-guy

🐾
Every artifact can be verifiably traced to Source Code and Hardware
View GitHub Profile
@ChristopherA
ChristopherA / brew-bundle-brewfile-tips.md
Last active July 2, 2026 01:20
Brew Bundle Brewfile Tips

Brew Bundle Brewfile Tips

Copyright & License

Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.

Sponsor

If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.

apiVersion: constraints.gatekeeper.sh/v1beta1
kind: LBTypeSvcNotAllowed
metadata:
name: deny-lb-type-svc-dev-ns
spec:
match:
kinds:
- apiGroups: [""]
kinds: ["Service"]
namespaces:
@velotiotech
velotiotech / deny-lb-type-svc.yaml
Created June 28, 2020 06:33
Constraint Template to deny service of type LoadBalancer
apiVersion: templates.gatekeeper.sh/v1beta1
kind: ConstraintTemplate
metadata:
name: lbtypesvcnotallowed
spec:
crd:
spec:
names:
kind: LBTypeSvcNotAllowed
listKind: LBTypeSvcNotAllowedList
@jaimegag
jaimegag / fluent-bit-configmap.yaml
Created June 24, 2020 01:41
FluentBit ConfigMap with audit logs
apiVersion: v1
kind: ConfigMap
metadata:
name: fluent-bit-config
namespace: tanzu-system-logging
labels:
k8s-app: fluent-bit
data:
# Configuration files: server, input, filters and output
# ======================================================
@martezr
martezr / active-root.py
Last active October 7, 2022 09:01
Identifying Active HashiCorp Vault Root Tokens
#!/usr/local/bin/python3
import os
import time
import hvac
import urllib3
from prettytable import PrettyTable
urllib3.disable_warnings()
@serafdev
serafdev / docker-compose-caddy.yml
Last active December 20, 2020 11:28
Caddy Reverse Proxy docker-compose.yml
version: '3'
volumes:
caddy_data:
caddy_config:
services:
caddy:
image: caddy
volumes:
- caddy_data:/data
- caddy_config:/config
#!/bin/bash
# printing version of the plugin
if [[ "$1" == "version" ]]
then
echo "kubectl fpods version 0.1.0"
exit 0
fi
kubectl get pods --all-namespaces --field-selector=status.phase!=Running
@zxkane
zxkane / image-all-tags-layers.sh
Last active July 11, 2024 10:35
get size of layers of docker image. Inspired by this post(https://ops.tips/blog/inspecting-docker-image-without-pull/).
#!/bin/bash
set -o errexit
source ./library
# Entry point of the script.
# If makes sure that the user supplied the right
# amount of arguments (image_name)
# and then performs the main workflow:
# 1. retrieve the image digest
# 2. retrieve the layer info of image
@sohamkamani
sohamkamani / rsa.go
Created April 12, 2020 17:31
Example of RSA encryption, decryption, signing, and verification in Go
package main
import (
"crypto"
"crypto/rand"
"crypto/rsa"
"crypto/sha256"
"encoding/base64"
"fmt"
)
@josemotta
josemotta / k3s-multipass.sh
Last active December 14, 2020 10:19 — forked from lucj/k3s-multipass.sh
Setup a k3s kubernetes cluster using Multipass VMs
for node in node1 node2 node3;do
multipass launch -c 2 -d 2G -n $node
done
# Init cluster on node1
multipass exec node1 -- bash -c "curl -sfL https://get.k3s.io | sh -"
# Get node1's IP
IP=$(multipass info node1 | grep IPv4 | awk '{print $2}')