Skip to content

Instantly share code, notes, and snippets.

View aceat64's full-sized avatar

Andrew LeCody aceat64

View GitHub Profile
@aceat64
aceat64 / shell_startup_timings.md
Created March 2, 2025 19:59
Testing how long it takes to start a new shell with my current setup.

Shell Startup Timings

  • Cold start: 412ms
  • Warm start: 195ms

Initialization of the completion system (compinit/compaudit/compdef) appears to be the slowest part of shell startup. As shown by this test, zsh automatically handles caching for this which cuts startup time in half for subsequent shells.

Test Prep

  1. Add zmodload zsh/zprof to the start of ~/.zshrc and zprof to the end of the file.
@aceat64
aceat64 / reject-lastest-and-edge.yaml
Created July 14, 2023 01:31
ValidatingAdmissionPolicy to prevent use of :latest or :edge container images
apiVersion: admissionregistration.k8s.io/v1alpha1
kind: ValidatingAdmissionPolicy
metadata:
name: "reject-lastest-and-edge"
spec:
failurePolicy: Fail
matchConstraints:
resourceRules:
- apiGroups: ["apps"]
apiVersions: ["v1"]
@aceat64
aceat64 / macos_zsh.md
Last active September 8, 2022 19:58
MacOS and ZSH Setup
substitutions:
device_name: garage-door
friendly_name: Garage Door
esphome:
name: ${device_name}
platform: ESP32
board: featheresp32
wifi:
@aceat64
aceat64 / dimmer-switch.yaml
Created October 22, 2021 18:50
esphome light switch
substitutions:
device_name: dining-room-light
friendly_name: Dining Room Light
pwm_min_power: 15% # keep dimming functional at lowest levels
no_delay: 0s # transition when changing dimmer_lvl & relay delay
transition_length: .5s # transition when turning on/off
long_press_min: .4s # minimum time to activate long-press action
long_press_max: 2s # maximum time to activate long-press action
long_press_up: 100% # long press brightness
long_press_down: 33% # long press brightness
@aceat64
aceat64 / light-switch.yaml
Created October 22, 2021 18:48
esphome light switch
substitutions:
device_name: back-yard-flood
friendly_name: Back Yard Flood
esphome:
name: ${device_name}
platform: ESP8266
board: esp01_1m
esp8266_restore_from_flash: true
@aceat64
aceat64 / npm-on-udmp.md
Last active January 6, 2023 18:10
Nginx Proxy Manager on UDM-Pro
@aceat64
aceat64 / zapper.yml
Last active April 15, 2021 03:56
k8s-disk-zapper
!!!!!!!!!!!!!!!!!
!!! DANGEROUS !!!
!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! THESE JOBS WILL WIPE OUT DATA !!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
---
apiVersion: batch/v1
kind: Job
import os
import sys
import time
import atexit
import asyncio
import subprocess
import evdev
from evdev import InputDevice, categorize, ecodes
import RPi.GPIO as GPIO

Keybase proof

I hereby claim:

  • I am aceat64 on github.
  • I am andrewlecody (https://keybase.io/andrewlecody) on keybase.
  • I have a public key ASBGQuT0YD4OvLvPmNbcP1z9ZdbIrRoV1tcPouTw9kpPGwo

To claim this, I am signing this object: