Skip to content

Instantly share code, notes, and snippets.

@jpweber
jpweber / fish_right_prompt.fish
Created July 25, 2017 00:22 — forked from mgoodness/fish_right_prompt.fish
Add the current Kubernetes context to the right-hand side of your Fish Shell prompt
function fish_right_prompt
set -l k8s_color (set_color blue)
set -l k8s_context (kubectl config current-context)
echo -e -n -s $k8s_color "($k8s_context)"
end
@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"
@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
*/
@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)
##