Skip to content

Instantly share code, notes, and snippets.

@rverchere
rverchere / kube-state-metrics-vpa.yaml
Last active February 29, 2024 14:04
kube-state-metrics configuration for VPA metrics
## Kube State Metrics to get VPA metrics
# Old vs New metrics:
# - kube_verticalpodautoscaler_labels -> kube_customresource_verticalpodautoscaler_labels
# - kube_verticalpodautoscaler_status_recommendation_containerrecommendations_target -> kube_customresource_verticalpodautoscaler_status_recommendation_containerrecommendations_target
# - kube_verticalpodautoscaler_status_recommendation_containerrecommendations_lowerbound -> kube_customresource_verticalpodautoscaler_status_recommendation_containerrecommendations_lowerbound
# - kube_verticalpodautoscaler_status_recommendation_containerrecommendations_upperbound -> kube_customresource_verticalpodautoscaler_status_recommendation_containerrecommendations_upperbound
# - kube_verticalpodautoscaler_status_recommendation_containerrecommendations_uncappedtarget -> kube_customresource_verticalpodautoscaler_status_recommendation_containerrecommendations_uncappedtarget
# Resources:
# - https://github.com/kubernetes/kube-state-metrics/blob/main/docs/customresourcestate-me
@sbailliez
sbailliez / vagrant-vmware-fusion-13-apple-m1-pro.md
Last active June 25, 2024 13:33
Vagrant and VMWare Fusion 13 on Apple M1 Pro

Vagrant and VMWare Fusion 13 Player on Apple M1 Pro

This document summarizes notes taken to make VMWare Fusion 13 Player work on Apple M1 Pro. It builds upon a previous (deprecated) document based on VMWare Tech Preview 21H1

VMWare Fusion 13 was released on November 17, 2022 and Fusion 13.5 on October 19, 2023

Created on: November 20, 2022

Updated on: June 1, 2024

@kam1kaze
kam1kaze / nodelocaldns.sh
Last active December 12, 2019 17:39
install nodelocaldns on managed kubernetes clusters like GKE, EKS, AKS etc
#!/usr/bin/env bash
# Example:
#
# ❯ ./nodelocaldns.sh | kubectl apply -f -
# serviceaccount/node-local-dns created
# service/kube-dns-upstream created
# configmap/node-local-dns created
# daemonset.apps/node-local-dns created
#
@gene1wood
gene1wood / bitwarden-amazon-aws-credential-setup.md
Last active March 22, 2024 22:53
How to get BitWarden to differentiate between amazon.com consumer retail logins, AWS root logins and AWS IAM user logins

Here's how to get BitWarden to treat these three different types of Amazon logins as separate

  • amazon.com consumer retail business login
  • AWS root user login (AWS logins that use an email address)
  • AWS IAM user login (AWS logins that use a username)

amazon.com consumer retail

  • Set URI 1 to Exact with a value of

    https://www.amazon.com/ap/signin?_encoding=UTF8&ignoreAuthState=1&openid.assoc_handle=usflex&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.ns.pape=http%3A%2F%2Fspecs.openid.net%2Fextensions%2Fpape%2F1.0&openid.pape.max_auth_age=0&openid.return_to=https%3A%2F%2Fwww.amazon.com%2F%3Fref_%3Dnav_custrec_signin&switch_account=

@milesbxf
milesbxf / monzo-alertmanager-config.yaml
Last active June 24, 2024 04:45
Monzo's Alertmanager Slack templates
###################################################
##
## Alertmanager YAML configuration for routing.
##
## Will route alerts with a code_owner label to the slack-code-owners receiver
## configured above, but will continue processing them to send to both a
## central Slack channel (slack-monitoring) and PagerDuty receivers
## (pd-warning and pd-critical)
##
@Enteee
Enteee / :for
Last active December 26, 2022 22:05
Bash: Parallel execute and retain exit code
#!/usr/bin/env bash
# Wait for pids to terminate. If one pid exits with
# a non zero exit code, send the TERM signal to all
# processes and retain that exit code
#
# usage:
# :wait 123 32
function :wait(){
local pids=("$@")
@kam1kaze
kam1kaze / ioquake3_install.sh
Last active December 13, 2020 11:59
Install Quake 3 on Linux or OSX
#!/usr/bin/env bash
set -ex
if [[ "$OSTYPE" == "linux-gnu" ]]; then
# Linux
sudo apt-get update && sudo apt-get install ioquake3
mkdir -p ~/.q3a/baseq3 && pushd "$_"
elif [[ "$OSTYPE" == "darwin"* ]]; then
@StevenACoffman
StevenACoffman / _MicroService Proxy Gateway Solutions.md
Last active September 28, 2023 14:54
Microservice Proxy/Gateway Solutions

MicroService Proxy Gateway Solutions

Kong, Traefik, Caddy, Linkerd, Fabio, Vulcand, and Netflix Zuul seem to be the most common in microservice proxy/gateway solutions. Kubernetes Ingress is often a simple Ngnix, which is difficult to separate the popularity from other things.

Github Star Trend:

Github Star History for Kong vs traefik vs fabio vs caddy vs Zuul

This is just a picture of this link from March 2, 2019

Originally, I had included some other solution

@abayer
abayer / Jenkinsfile
Created February 15, 2017 15:17
An example Declarative Pipeline Jenkinsfile for Feb 15 2017 demo
// A Declarative Pipeline is defined within a 'pipeline' block.
pipeline {
// agent defines where the pipeline will run.
agent {
// This also could have been 'agent any' - that has the same meaning.
label ""
// Other possible built-in agent types are 'agent none', for not running the
// top-level on any agent (which results in you needing to specify agents on
// each stage and do explicit checkouts of scm in those stages), 'docker',
@ebautistabar
ebautistabar / systemd-fsck-troubleshooting.md
Last active August 17, 2017 17:20
Troubleshooting of systemd and fsck on boot

Troubleshooting of systemd and fsck on boot

I investigated some problems with fsck and systemd recently. In the process, I learned quite a few things. And when I finished, I wrote these notes for future reference. Hope somebody finds them useful.

Setup

Open grub config file with:

sudo vi /etc/default/grub

In order to see the system log on boot, remove quiet and splash from the kernel command line. Also, we want as much information as possible about systemd, so add the following params to the kernel command line: