Skip to content

Instantly share code, notes, and snippets.

View bleggett's full-sized avatar
💭
bleppin'

Ben Leggett bleggett

💭
bleppin'
  • Within The Bromley Contingent
  • 11:40 (UTC -04:00)
View GitHub Profile
;; -*- mode: emacs-lisp; lexical-binding: t -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Layer configuration:
This function should only modify configuration layer settings."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
;; `+distribution'. For now available distributions are `spacemacs-base'
;;; init.el -*- lexical-binding: t; -*-
;; Copy this file to ~/.doom.d/init.el or ~/.config/doom/init.el ('doom install'
;; will do this for you). The `doom!' block below controls what modules are
;; enabled and in what order they will be loaded. Remember to run 'doom refresh'
;; after modifying it.
;;
;; More information about these modules (and what flags they support) can be
;; found in modules/README.org.
;;; .doom.d/config.el -*- lexical-binding: t; -*-
;; Place your private configuration here
;;Use custom font
(setq doom-font (font-spec :family "Droid Sans Mono" :size 17))
;; No quit prompt please
(setq confirm-kill-emacs nil)
;;; .doom.d/config.el -*- lexical-binding: t; -*-
;; Place your private configuration here
;;Use custom font
(setq doom-font (font-spec :family "Droid Sans Mono" :size 17))
;; No quit prompt please
(setq confirm-kill-emacs nil)
## HOW TO DO DADGUM ENV VARS FOR UI AND SHELL APPS ON macOS:
# 1. If you want to OVERRIDE existing paths, prepend to existing path in ~/.zprofile
# 2. If you want to ADD NEW paths that do not need to override system paths, append to existing path in ~/.zshenv
#Path to your oh-my-zsh installation.
export ZSH=~/.oh-my-zsh
export FIREFOX_BIN=/Applications/FirefoxDeveloperEdition.app/Contents/MacOS/firefox-bin
alias emc="emacsclient -n"

Keybase proof

I hereby claim:

  • I am bleggett on github.
  • I am algosystem (https://keybase.io/algosystem) on keybase.
  • I have a public key whose fingerprint is BB5D 8751 E772 BA23 3FE6 10C5 E3C7 EF87 3EEF 10BE

To claim this, I am signing this object:

@bleggett
bleggett / dsd2flac.py
Last active April 23, 2022 23:03 — forked from hyperknot/dsd2flac.py
DSD to FLAC conversion using SoX DSD. Original by @hyperknot. Scans the file once to determine optimum gain, then converts using that. You can get SoX DSD binaries from https://audiodigitale.eu/repo/sox/
#!/usr/bin/env python3
import pathlib
import subprocess
import sys
import shutil
import math
root = pathlib.Path(__file__).parent.resolve()
target_root = root / 'dsd'
@bleggett
bleggett / gist:7dd1e05d9c9f9063744e02a55489ca65
Created January 20, 2023 22:35
Istio DR rule SAN override
# TODO destination rules need to be created for any SPIFFE IDs that don't follow the
# format that Istio expects (ns/NAMESPACE/sa/TARGET_POD_SVC_ACCOUNT)
# because ATM Istio defaults to clientside SAN checks that assume that SPIFFE ID format
# and this is not currently configurable - however this should be resolved soonish.
# https://github.com/istio/istio/issues/28712
#
# Additionally, since DestinationRules override Istio's "default automTLS" settings, we need `mode: ISTIO_MUTUAL`
# in each DestRule to tell Istio that even though we have a custom destination config, we still want mTLS.
{{- range .Values.spireIdentities }}
---
#!/usr/bin/env sh
su-exec root apt-get update && su-exec root apt-get install -y cmake-data
export DOCKER_SOCKET_MOUNT="-v /var/run/docker.sock.raw:/var/run/docker.sock"
export BUILD_ZTUNNEL=1
export BUILD_ZTUNNEL_REPO="$(pwd)/ztunnel"
export TAG=bm-ambienttest
export HUB=docker.io/bmleggett
export IMAGE_VERSION=master-7b5c2064d06c417cc34d4ed760fd65134055c301
export DOCKER_ARCHITECTURES=linux/arm64

Istio DestinationRule hax

#