Skip to content

Instantly share code, notes, and snippets.

View jessesanford's full-sized avatar

Jesse Sanford jessesanford

View GitHub Profile
- After making changes, ALWAYS make sure to start up a new server so I can test it.
- Always look for existing code to iterate on instead of creating new code.
- Do not drastically change the patterns before trying to iterate on existing patterns.
- Always kill all existing related servers that may have been created in previous testing before trying to start a new server.
- Always prefer simple solutions
- Avoid duplication of code whenever possible, which means checking for other areas of the codebase that might already have similar code and functionality
- Write code that takes into account the different environments: dev, test, and prod
- You are careful to only make changes that are requested or you are confident are well understood and related to the change being requested
- When fixing an issue or bug, do not introduce a new pattern or technology without first exhausting all options for the existing implementation. And if you finally do this, make sure to remove the old implementation afterwards so we d
@txoof
txoof / pdf_rmN.md
Last active May 29, 2025 16:09
PDF to Editable Remarkable Notebook (Mac OS)

Converting a PDF to an editable reMarkable Notebook

Use case: Working with PDF text books, it can be helpful to be able to extract problems and images to use in notes and when working problemsets on the reMarkable tablet.

These instructions are MacOS centric, but should be reproducable on most platforms as the tools are fairly platform agnostic.

Requirements

  • homebrew - package manager for installing components
  • DrawJ2d - Convert PDF to remarkable notebook (rmn) format
@mustafakirimli
mustafakirimli / enable_vmx.sh
Last active June 20, 2024 08:08
Enable nested virtualization on GKE (be careful when running)
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
# $IG_URLS as env
# GET auth token to be used in curl/rest api
AUTH_TOKEN=$(gcloud auth print-access-token)
@jessesanford
jessesanford / ssl.sh
Last active February 23, 2021 20:35 — forked from alex-leonhardt/ssl.sh
Create signed SSL cert with K8S CA
#! /bin/bash
set -o errexit
export APP="${1:-mutateme}"
export NAMESPACE="${2:-default}"
export CSR_NAME="${APP}.${NAMESPACE}.svc"
echo "... creating ${app}.key"
openssl genrsa -out ${APP}.key 2048
@Piotr1215
Piotr1215 / k8s-bookmarks-CKA-CKAD.html
Last active March 16, 2025 22:45
K8s bookmarks for CKA, CKAD and CKS exams
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
DO NOT EDIT! -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
<DL><p>
<DT><H3 ADD_DATE="1626629115" LAST_MODIFIED="1626629462" PERSONAL_TOOLBAR_FOLDER="true">Bookmarks bar</H3>
<DL><p>
@MCMrARM
MCMrARM / 91-pulseaudio-custom.rules
Created August 30, 2019 19:22
System configuration files for the T2 audio driver (https://github.com/MCMrARM/mbp2018-bridge-drv/)
SUBSYSTEM!="sound", GOTO="pulseaudio_end"
ACTION!="change", GOTO="pulseaudio_end"
KERNEL!="card*", GOTO="pulseaudio_end"
SUBSYSTEMS=="pci", ATTRS{vendor}=="0x106b", ATTRS{device}=="0x1803", ENV{PULSE_PROFILE_SET}="apple-t2.conf"
LABEL="pulseaudio_end"
@alex-leonhardt
alex-leonhardt / ssl.sh
Created July 27, 2019 14:42
Create signed SSL cert with K8S CA
#! /bin/sh
set -o errexit
export APP="${1:-mutateme}"
export NAMESPACE="${2:-default}"
export CSR_NAME="${APP}.${NAMESPACE}.svc"
echo "... creating ${app}.key"
openssl genrsa -out ${APP}.key 2048
@jessesanford
jessesanford / .chunkwmrc
Created January 3, 2019 19:05 — forked from shihanng/.chunkwmrc
chunkwm + skhd
#!/bin/bash
#
# NOTE: specify the absolutepath to the directory to use when
# loading a plugin. '~' expansion is supported.
#
chunkc core::plugin_dir /usr/local/opt/chunkwm/share/chunkwm/plugins
#
@jjo
jjo / kubectl-root-in-host-nopriv.sh
Last active June 27, 2025 23:24
Yeah. Get a root shell at any Kubernetes *node* via `privileged: true` + `nsenter` sauce. PodSecurityPolicy will save us. DenyExecOnPrivileged didn't (kubectl-root-in-host-nopriv.sh exploits it)
#!/bin/sh
# Launch a Pod ab-using a hostPath mount to land on a Kubernetes node cluster as root
# without requiring `privileged: true`, in particular can abuse `DenyExecOnPrivileged`
# admission controller.
# Pod command in turn runs a privileged container using node's /var/run/docker.sock.
node=${1}
case "${node}" in
"")
nodeSelector=''
podName=${USER+${USER}-}docker-any
@jasonmcintosh
jasonmcintosh / aws-creds.sh
Last active April 27, 2020 22:29
aws-creds helper script
#!/bin/bash
VAULT_PATH=$1
ROLE=$2
DURATION=$3
if [ -z "$VAULT_ADDR" ]; then
echo "Missing VAULT_ADDR env variable"
exit 1
fi
if [ -z "$VAULT_PATH" ]; then