Skip to content

Instantly share code, notes, and snippets.

View JulienBreux's full-sized avatar

Julien Breux JulienBreux

View GitHub Profile
@mikesparr
mikesparr / gke-cloud-armor.sh
Created June 16, 2022 00:57
Example Google Kubernetes Engine (GKE) app with Managed Certificate and Cloud Armor rate limiting
#!/usr/bin/env bash
#####################################################################
# REFERENCES
# - https://cloud.google.com/armor/docs/integrating-cloud-armor#with_ingress
# - https://cloud.google.com/armor/docs/configure-security-policies
# - https://stackoverflow.com/questions/63841501/how-to-block-multiple-countries-with-one-expression-in-google-cloud-armor
# - https://cloud.google.com/kubernetes-engine/docs/how-to/managed-certs
# - https://cloud.google.com/kubernetes-engine/docs/how-to/ingress-features#create_backendconfig
# - Optional: cloud.google.com/neg: '{"ingress": true}' and ClusterIP (vs NodePort)
@tomdaley92
tomdaley92 / README.md
Last active October 15, 2024 19:12
Proxmox - Email Alerts Setup (gmail)

Proxmox - Email Alerts Setup (gmail)

  1. SSH into proxmox node and become root user. Run the following commands to download extra software dependencies we'll need.

    apt update
    apt install -y libsasl2-modules mailutils
  2. Enable 2FA for the gmail account that will be used by going to security settings

Task 1: Create a project jumphost instance
Navigation menu > Compute engine > VM Instance
Task 2: Create a Kubernetes service cluster
gcloud config set compute/zone us-east1-b
gcloud container clusters create nucleus-webserver1
@szamuboy
szamuboy / prometheus-operator-helm.yaml
Last active December 28, 2022 19:04
Prometheus-operator HelmChart CRD for k3s
apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:
name: prometheus-operator
namespace: kube-system
spec:
chart: stable/prometheus-operator
targetNamespace: prometheus
valuesContent: |-
alertmanager:
@lee-dohm
lee-dohm / github-actions.md
Last active December 8, 2020 11:02
GitHub Actions presentation notes

GitHub Actions

Outline

  • What is GitHub Actions useful for?
    • How is it different from Probot?
  • Workflows -- Sample Workflow
    • on
    • resolves
  • Works similar to Make targets but not ordered
@j33ty
j33ty / print-memory.go
Created May 22, 2019 20:54
Go print current memory
package main
import (
"runtime"
"fmt"
"time"
)
func main() {
// Print our starting memory usage (should be around 0mb)
@AmirSoleimani
AmirSoleimani / main.go
Last active January 10, 2023 08:18
Pub/Sub Pattern Golang
package main
import (
"patternsample/mq"
"fmt"
"time"
)
func main() {
@matthewpalmer
matthewpalmer / pod.yaml
Created July 21, 2018 04:13
kubernetes nginx php-fpm pod
# Create a pod containing the PHP-FPM application (my-php-app)
# and nginx, each mounting the `shared-files` volume to their
# respective /var/www/html directories.
kind: Pod
apiVersion: v1
metadata:
name: phpfpm-nginx-example
spec:
volumes:
@alex-leonhardt
alex-leonhardt / main.go
Last active October 11, 2024 11:34
golang text/template with a map[string]interface{} populated from mixed json data
package main
import (
"encoding/json"
"os"
"reflect"
"text/template"
)