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 / 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:\"
@asachs01
asachs01 / graylog_metrics.json
Created October 31, 2021 02:18
Graylog Grafana Dashboard
{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
@asachs01
asachs01 / graylog_api_routes.json
Created November 24, 2020 02:31
A listing of all api endpoints & routes for Graylog
{
"models": {},
"apiVersion": "4.0.0+9376305",
"swaggerVersion": "1.2",
"apis": [],
"basePath": "http://192.168.156.229:9000/api",
"resourcePath": "/streams/streamid/alerts/alertId/history"
}
{
"models": {