Skip to content

Instantly share code, notes, and snippets.

View markcallen's full-sized avatar

Mark Allen markcallen

View GitHub Profile
@markcallen
markcallen / learn-vim.txt
Created August 28, 2025 00:43
Example file for learning vim
Vim in One File — A Practical Teaching Guide
===============================================
Use this file to teach someone Vim from zero to productive. Read top to bottom, or jump by section.
0) Panic Button — How to quit
-----------------------------
- Press ESC to make sure you’re in Normal mode.
- Type :q and press ENTER to quit (fails if file changed).
- Type :q! to quit and discard changes.
@markcallen
markcallen / vim-min.sh
Last active March 23, 2026 09:40
Create a miniminal vim installation
cat << EOF > $HOME/.vimrc-min
syntax on
set backspace=start,eol,indent
set hidden
set noswapfile
set expandtab
set tabstop=2
set softtabstop=2
set shiftwidth=2
@markcallen
markcallen / brew_health.sh
Created April 18, 2025 19:41
Cleanup brew. Only run it once a week. Only allow one instance to be running at a time.
#!/bin/bash
# Usage: ./brew_health.sh [options]
# Options:
# --force Run maintenance regardless of last run time
# --cleanup Remove any stale lock file before running
# --dry-run Show what would be done without making changes
# --status Show when the script was last run
#
# This script performs Homebrew maintenance tasks including:
@markcallen
markcallen / tsconfig-gen.sh
Last active April 13, 2025 18:07
This script initializes a TypeScript project with a customized tsconfig.json.
#!/bin/bash
# ------------------------------------------------------------------------------
# TypeScript Config Generator Script
#
# This script initializes a TypeScript project with a customized tsconfig.json.
# It checks for an existing tsconfig.json and exits if one is found.
# It also ensures that strip-json-comments is available to format the output.
#
# Learn more at: https://www.markcallen.com/tsconfig/

Keybase proof

I hereby claim:

  • I am markcallen on github.
  • I am markcallen (https://keybase.io/markcallen) on keybase.
  • I have a public key ASCXjc4GW-GO_7Bp4lQsnLNuKOiGl3lL83eXFnfxEn3Newo

To claim this, I am signing this object:

@markcallen
markcallen / getcert.py
Last active June 8, 2018 14:39
Get the encryption certificate from an ADFS metadata file
import sys
from xml.etree import cElementTree as ET
x509s = []
def read_in():
return ET.fromstring(sys.stdin.read())
def main():
xml = read_in()
new gist