Skip to content

Instantly share code, notes, and snippets.

View cmbaughman's full-sized avatar
🎯
Focusing

Chris Baughman cmbaughman

🎯
Focusing
View GitHub Profile
@cmbaughman
cmbaughman / linux_share_screen.md
Created March 25, 2026 15:57
Linux Share Terminal

A Quick Tip for SSH Sessions:

You and another user can actually share a single terminal session! This is incredibly helpful for pair programming or troubleshooting, or whatever.

Here's how you do it:

  1. You both have to be logged in via SSH.
  2. One user starts a session tmux new -s pair
  3. The other attaches to it tmux attach -t pair
@cmbaughman
cmbaughman / review.md
Created March 20, 2026 13:06
Monthly Ops Review

Monthly Ops Review Checklist

Date: YYYY-MM-DD

Open Remediations

  • Review all postmortems from the last 30 days
  • Check status of every remediation marked TODO or IN PROGRESS
  • Update statuses (DONE / WONTFIX with reason / new deadline)
  • Carry forward anything overdue with a realistic new deadline
@cmbaughman
cmbaughman / postmortem.md
Created March 20, 2026 13:05
Postmortem Template

Postmortem: [Short descriptive title]

Date: YYYY-MM-DD Duration: [Time from detection to resolution] Severity: [S1: service down | S2: degraded | S3: minor | S4: cosmetic] Tags: [e.g., disk, docker, dns, networking, backup, certs]

Impact

[1–3 sentences. What broke, from the user's perspective? Even if "the user" is just you. What could you not do while this was happening?]

@cmbaughman
cmbaughman / warp_cli_stuff.sh
Created March 2, 2026 17:24
Various Stuff for Cloudflare Warp CLI I need from time to time.
#!/bin/bash
# INSTALL
# =======
# Add Cloudflare's gpg key
curl -fsSL https://pkg.cloudflareclient.com/pubkey.gpg | sudo gpg --yes --dearmor --output /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg
# Add the repository
echo "deb [signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/cloudflare-client.list
@cmbaughman
cmbaughman / android_dev_usb.sh
Created March 2, 2026 00:49
Get Android Dev Tools Working Right With USB
#!/usr/bin/bash
sudo apt update
sudo apt install android-sdk-platform-tools-common
# If it's already installed, manually add the Google vendor ID
echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"' | sudo tee /etc/udev/rules.d/51-android.rules
sudo udevadm control --reload-rules
sudo service udev restart
@cmbaughman
cmbaughman / superscript.js
Created February 4, 2026 00:35
Replace ® with superscript version
window.addEventListener('DOMContentLoaded', () => {
const walk = document.createTreeWalker(
document.body,
NodeFilter.SHOW_TEXT,
null,
false
);
const reg = /®/g;
let node;
@cmbaughman
cmbaughman / modern-reset.css
Created January 8, 2026 18:19
Awesome Modern CSS Reset by Rahul Kaklotar (https://medium.com/@kaklotarrahul79)
/*
* A Modern CSS Reset (2025 Edition)
* Inspired by Josh Comeau, Andy Bell, and community best practices.
* Usage: Apply at the top of your CSS for a clean foundation.
*/
/* 1. Box-sizing: Border-box for all elements */
*, *::before, *::after {
box-sizing: border-box;
}
@cmbaughman
cmbaughman / useful.js
Created October 21, 2025 18:29
Useful Javascript Tips
/////////////////////////////////////////////////////////
// Debounce: wait until the user stops typing
function debounce(fn, delay) {
let timeout;
return (...args) => {
clearTimeout(timeout);
timeout = setTimeout(() => fn.apply(this, args), delay);
};
}
@cmbaughman
cmbaughman / kas.css
Last active October 21, 2025 18:05
Kick-ass style patterns to include in every project
/* Recommended font stack for neutral, modern look */
:root { --ui-font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; }
body { font-family: var(--ui-font); }
/* Self-hosted font (or just comment out) */
@font-face{
font-family: 'YourCoolFont';
src: url('/fonts/yourcool.woff2') format('woff2');
font-display: swap;
@cmbaughman
cmbaughman / cloud-config.yaml
Created October 16, 2025 13:14
Cloud Init Script To Install Docker
#cloud-config
package_update: true
package_upgrade: true
packages:
- apt-transport-https
- ca-certificates
- curl
- gnupg
- lsb-release