Skip to content

Instantly share code, notes, and snippets.

View asachs01's full-sized avatar
Caffeinated. Always.

Aaron Sachs asachs01

Caffeinated. Always.
View GitHub Profile
@asachs01
asachs01 / nord-theme.omp.json
Created August 21, 2025 17:37
Nord theme for Oh My Posh
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"palette": {
"nord0": "#2E3440",
"nord1": "#3B4252",
"nord2": "#434C5E",
"nord3": "#4C566A",
"nord4": "#D8DEE9",
"nord5": "#E5E9F0",
"nord6": "#ECEFF4",
@asachs01
asachs01 / powershell-specialist.md
Last active August 19, 2025 19:00
Powershell scripting and automation specialist agent for Claude Code.

PowerShell Specialist Agent with Pester Testing

name description model
powershell-specialist Expert in PowerShell scripting and automation, specializing in Windows administration, cross-platform PowerShell development, enterprise automation solutions, and comprehensive testing with Pester following PoshCode community standards and modern PowerShell best practices. Use PROACTIVELY for PowerShell script creation, optimization, complex automation tasks, and test-driven development. claude-sonnet-4-20250514

Core Capabilities

  • PowerShell Core and Windows PowerShell development with advanced functions
  • Pipeline-aware cmdlet development using CmdletBinding attributes
  • Custom function and module development with proper parameter validation
@asachs01
asachs01 / carne-guisada-heb.html
Last active May 6, 2025 16:15
Carne Guisada Recipe as microdata format
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Carne Guisada Tacos</title>
</head>
<body>
<div class="hrecipe">
<h1 class="fn">Carne Guisada Tacos</h1>
<p class="summary">Slow-simmered beef stew meat seasoned with Tex-Mex spices, served in warm tortillas with fresh toppings.</p>
@asachs01
asachs01 / .clinerules
Created April 3, 2025 01:02 — forked from ruvnet/.clinerules
SPARC Cursor/Cline Rules guide structured agentic coding through simplicity, iteration, clear documentation, symbolic reasoning, rigorous testing, and focused AI-human collaboration, ensuring maintainable, secure, high-quality outcomes.
# SPARC Agentic Development Rules
Core Philosophy
1. Simplicity
- Prioritize clear, maintainable solutions; minimize unnecessary complexity.
2. Iterate
- Enhance existing code unless fundamental changes are clearly justified.
@asachs01
asachs01 / the_project_v2.md
Created April 2, 2025 18:18
A modern infrastructure deployment exercise for those wanting to get started in tech.

Modern Low-Cost Infrastructure Project for Beginners

Overall Goal

Set up a personal website on a virtual machine that follows modern best practices while minimizing costs.

Required Resources

  • A low-cost virtual machine (VM) from a provider like DigitalOcean, Linode, or Hetzner (~$5/month)
  • A domain name (can be as low as $1-2/year for some TLDs, or free from Freenom)
  • A personal computer with internet access
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Cushaw Cheesecake Recipe</title>
</head>
<body>
<div itemscope itemtype="http://schema.org/Recipe">
<h1 itemprop="name">Cushaw Cheesecake</h1>
<div>
@asachs01
asachs01 / README.md
Last active January 30, 2024 13:30
Scripts used for installing Prometheus on Windows & Linux

Aaron's Scripts for Installing the Prometheus Node Exporter, Windows Exporter and Promtail

This is a collection of the scripts that I'm using to install the Prometheus node exporter, Windows exporter and promtail in my hoem lab environments. There are certainly more battle-tested solutions (i.e., the Ansible Prometheus collection is 🤌🤌🤌), but these work well enough to use in small environments. Feel free to use and abuse.

NOTE: Rather than reinventing the wheel on Linux, I'm using https://github.com/carlocorradini/node_exporter_installer to install the node exporter.

NOTE: While yes, Windows does have the ability to create a service natively, I've found that starting the Promtail binary via the natively supported method isn't possible. I'm using WinSW to create a service that will start the Promtail binary.

@asachs01
asachs01 / windows_account_lockouts.json
Created October 17, 2023 18:23
Grafana Dashboard for Windows Account Lockouts
{
"__inputs": [
{
"name": "DS_LOKI",
"label": "Loki",
"description": "",
"type": "datasource",
"pluginId": "loki",
"pluginName": "Loki"
}
@asachs01
asachs01 / event4740_loki_logql_expr.txt
Created September 27, 2023 13:05
A Grafana Loki logql expression for extracting usernames and lockout sources for event 4740
{job="windows_security"}
| json
| event_id = `4740`
| line_format "{{.event_data}}"
| regexp "'TargetUserName'>(?P<UserName>[^<]+)<"
| regexp "'TargetDomainName'>(?P<LockoutSource>[^<]+)<"
@asachs01
asachs01 / install_promtail.ps1
Last active September 27, 2023 14:11
A Powershell Script for Installing Promtail on Windows
param (
[string]$hostUrl = $(if ($env:PROMTAIL_HOST_URL) { $env:PROMTAIL_HOST_URL } else { "http://localhost:3100/loki/api/v1/push" }),
[string]$eventTypesStr = $(if ($env:PROMTAIL_EVENT_TYPES) { $env:PROMTAIL_EVENT_TYPES } else { "Application,Security,System" })
)
# Variables
$latestReleaseUrl = "https://github.com/grafana/loki/releases/latest"
$repoUrl = "https://github.com/grafana/loki"
$winswUrl = "https://github.com/winsw/winsw/releases/download/v2.12.0/WinSW-x64.exe"
$outputDir = "C:\"