Skip to content

Instantly share code, notes, and snippets.

@jpweber
jpweber / monzo-alertmanager-config.yaml
Created March 13, 2020 23:33 — forked from milesbxf/monzo-alertmanager-config.yaml
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)
##
@jpweber
jpweber / usb_hid_keys.h
Created September 22, 2019 04:11 — forked from MightyPork/usb_hid_keys.h
USB HID Keyboard scan codes
/**
* USB HID Keyboard scan codes as per USB spec 1.11
* plus some additional codes
*
* Created by MightyPork, 2016
* Public domain
*
* Adapted from:
* https://source.android.com/devices/input/keyboard-devices.html
*/
## Environment Variables for grafana-deployment.yaml
GF_AUTH_LDAP_ENABLED=true
GF_AUTH_LDAP_CONFIG_FILE=/etc/grafana/ldap.toml
## Volume Mounts
- mountPath: /etc/grafana/ldap.toml
name: grafana-ldap-config
readOnly: false
## Volume
# Below example would be for something externally available
# at http://app1.example.com/ handes URIs of /, /foo and /bar
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: http-service-test
labels:
" install vim-plug
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin('~/.vim/plugged')
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
apiVersion: kubeadm.k8s.io/v1beta1
bootstrapTokens:
- groups:
- system:bootstrappers:kubeadm:default-node-token
token: abcdef.0123456789abcdef
ttl: 24h0m0s
usages:
- signing
- authentication
kind: InitConfiguration
@jpweber
jpweber / gist:42462c8409793ccd19585bacbdcb7270
Created January 31, 2019 03:19 — forked from jefferai/gist:e2bebc3bb97fed521666
Example of Vault PKI (X509) backend issuing certificates to client and server, which then perform TLS mutual auth
package main
import (
"crypto/tls"
"fmt"
"html"
"io/ioutil"
"log"
"net"
"net/http"
" install vim-plug
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin('~/.vim/plugged')
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
Plug 'maralla/completor.vim'
@jpweber
jpweber / http-test-service.yaml
Last active September 7, 2018 17:21
kube manifest for http test service
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: http-service-example-v2
spec:
replicas: 3
strategy:
rollingUpdate:
maxUnavailable: 1
@jpweber
jpweber / alertmanager.yaml
Created June 21, 2018 14:00
alert manager config example
apiVersion: v1
kind: ConfigMap
metadata:
name: prometheus-alertmanager
namespace: monitoring
data:
alertmanager.yml: |-
global:
##