Skip to content

Instantly share code, notes, and snippets.

View hed0rah's full-sized avatar
🤠
droppin the ball

hed0rah hed0rah

🤠
droppin the ball
View GitHub Profile
@hed0rah
hed0rah / git-explore.md
Created May 11, 2026 13:55
git Explore

Git Log Exploration Cheatsheet

Ultimate All-in-One (Graph, Full Message/MR Description, and Code Diff)

git log --graph --patch --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset%n%n%w(80,2,2)%B%n'

Search Commit Messages for Specific Keywords

git log --grep="search term"

Find Commits that Added or Removed Specific Code Strings

git log -S"code_snippet"

@hed0rah
hed0rah / tar_git_exlude.sh
Created April 29, 2026 19:57
tarball exclude revision controll stuff
tar \
--exclude='.git' \
--exclude='node_modules' \
--exclude='__pycache__' \
--exclude='.venv' \
--exclude='venv' \
--exclude='.next' \
--exclude='dist' \
--exclude='build' \
--exclude='target' \
@hed0rah
hed0rah / x8r_overview_beta.md
Created April 21, 2026 14:34
x8r overview (preview)

x8r

A native CLI + shared library that answers two questions fast: "how many tokens is this file?" and "where do I cut it at ≤N tokens without slicing a function in half?"

What it is

  • single-purpose token-aware chunker for LLM agent tools
  • drop-in replacement for calling tiktoken in a subprocess loop
  • emits byte offsets [start, end) + token counts + boundary kind

Why

@hed0rah
hed0rah / gist:3f12cfd9e8e397b83770ad1b9631be75
Created April 18, 2026 23:23
Windows 11 Pro 25H2 -- AI and Telemetry Lockdown Cheatsheet
# Windows 11 Pro 25H2 -- AI and Telemetry Lockdown Cheatsheet
Tested on build 26200.x. Assumes Windows 11 Pro (gpedit.msc access required for Group Policy sections).
---
## 1. Settings App
### Privacy & Security > General
@hed0rah
hed0rah / yt-dlp_meta.md
Created April 18, 2026 21:18
yt-dlp Metadata extraction

yt-dlp Cheatsheet: Metadata, Playlists & Lists

(No downloads — just metadata extraction)

All commands below use simulation mode by default (no video/audio is ever downloaded).
Add > output.txt (or > output.csv) at the end to save to a file, just like your example.

1. Core Flags You’ll Use Most

Flag Purpose
--flat-playlist Treat playlist as a flat list of videos (fast, no deep expansion)
@hed0rah
hed0rah / faux_latex.html
Created April 18, 2026 20:40
LaTeX whitepaper style whitepaper template
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Reliability HTML Whitepaper Template</title>
<style>
:root {
--paper: #fcfcfa;
@hed0rah
hed0rah / mergestat.py
Created April 8, 2026 00:17
KSM stats from /sys/kernel/mm/ksm/pages_shared
#!/usr/bin/env python3
# i found a rinky dink python2 version of this in my old files. bringing it to 2026 for the hell of it.
import os
ksm_path = '/sys/kernel/mm/ksm/'
def get_val(name):
try:
with open(os.path.join(ksm_path, name), 'r') as f:
@hed0rah
hed0rah / mcp.json
Created April 4, 2026 03:07
Windows git bash SSE MCP
{
"mcpServers": {
"windows_gitbash_mcp": {
"url": "http://127.0.0.1:3001/sse"
}
}
}
@hed0rah
hed0rah / gitbash_mcp.py
Created April 3, 2026 14:28
Windows Basic Git Bash MCP
{
"mcpServers": {
"dumb_shell": {
"command": "python",
"args": [
"-u",
"C:/Users/<username>/<directory>/gitbash_mcp.py"
],
"cwd": "C:/Users/<username>/<directory>/",
"env": {
@hed0rah
hed0rah / minimal_snn.py
Created April 2, 2026 17:33
Minimal Spiking Neural Net example
import numpy as np
# --- Parameters ---
num_neurons = 5
timesteps = 100
threshold = 1.0
decay = 0.95
learning_rate = 0.01
# --- State ---