Skip to content

Instantly share code, notes, and snippets.

View hed0rah's full-sized avatar

hed0rah hed0rah

View GitHub Profile
@hed0rah
hed0rah / ollama_cheat.md
Created March 28, 2026 10:18
ollama cheat sheet

Ollama Cheatsheet (Advanced) - Ubuntu / Linux


Installation & Service Management

# Install Ollama
curl -fsSL https://ollama.com/install.sh | sh
@hed0rah
hed0rah / mech_interp_vault.md
Created March 27, 2026 06:31
Mechanistic Interpretability: Research Vault

Mechanistic Interpretability: Research Vault (Updated March 2026)

1. Core Frameworks & Theory (Surveys & Foundational Concepts)

@hed0rah
hed0rah / playwright_test.py
Created March 26, 2026 02:52
Playwright test
python -c "
import asyncio from playwright.async_api import async_playwright
async def test():
pw = await async_playwright().start()
browser = await pw.chromium.launch(headless=True)
page = await browser.new_page()
await page.goto('https://example.com')
print('Title:', await page.title()
@hed0rah
hed0rah / pmlogger_pcp.md
Created March 23, 2026 17:01
pmlogger / pcp cheatsheet

Performance Co-Pilot (PCP) + pmlogger Cheatsheet

(Updated 2025–2026 – most frequently used commands, configs & patterns)

1. Service Management (systemd)

systemctl status pmcd pmlogger pmproxy # core trio systemctl restart pmcd pmlogger pmproxy systemctl enable --now pmcd pmlogger pmproxy

journalctl -u pmcd -u pmlogger -u pmproxy -xe # quick error check

@hed0rah
hed0rah / js_console_test.js
Created March 23, 2026 16:00
Small JS Console Test
console.clear();
const t0 = performance.now();
for (let i = 0; i < 1e6; i++); // small workload
const t1 = performance.now();
console.log("Time:", (t1 - t0).toFixed(2), "ms");
console.log("Now:", new Date().toLocaleTimeString());
console.log("Memory:", performance.memory ? performance.memory.usedJSHeapSize : "N/A");
console.log("CPU cores:", navigator.hardwareConcurrency);
@hed0rah
hed0rah / js_benchmarks.js
Created March 23, 2026 15:58
JS Console Benchmark Tests
// performance-test-snippets.js
// Paste these one by one (or selected groups) into your custom JS console/TUI to stress-test performance monitoring
// 1. Basic CPU burn (4 seconds of heavy math)
let start = performance.now();
while (performance.now() - start < 4000) {
Math.sqrt(Math.random() * Math.random() * 999999);
}
console.log("4-second CPU burn finished");
@hed0rah
hed0rah / sysprofile
Created March 21, 2026 19:07
system profile dump
#!/bin/bash
# =============================================================
# sysprofile — Deep system profile dump
#
# Generates a comprehensive plain-text snapshot of a Linux box.
# Designed to be pasted into AI conversations for full context.
#
# Covers: hardware, kernel, storage, network, GPU, thermal,
# users, services, packages, dev tools, containers, firewalls,
# conda/python/node environments, cron, logs, and more.
@hed0rah
hed0rah / venv_func.sh
Created March 20, 2026 04:44
venv ez button
venv() {
local d="${1:-.venv}"
if [[ -d "$d" ]]; then
source "$d/bin/activate"
echo "activated $d ($(python --version), $(pip list 2>/dev/null | tail -n +3 | wc -l) packages)"
else
python3 -m venv "$d" && source "$d/bin/activate"
echo "created & activated $d ($(python --version))"
fi
}
@hed0rah
hed0rah / building-busybox.md
Created March 20, 2026 03:29
Build BusyBox

Building Busybox from Source

busybox.net has been unreliable. Source mirrors:

git clone https://git.busybox.net/busybox
# or
git clone https://github.com/mirror/busybox
@hed0rah
hed0rah / saddasasd.txt
Created March 19, 2026 22:47
jkdsakjdsa
┌──(booger㉿killengn)-[~/bcc-bpf]
└─$ sudo python3 ~/bcc-bpf/examples/file_watcher.py python3
Watching file I/O for: python3 (excluding self pid=8531)
──────────────────────────────────────────────────────────────────────────────
OP PID COMM BYTES FILENAME
──────────────────────────────────────────────────────────────────────────────
OPEN pid=8534 comm=python3 /etc/ld.so.cache
OPEN pid=8534 comm=python3 /lib/aarch64-linux-gnu/libm.so.6
READ pid=8534 comm=python3 832 bytes
OPEN pid=8534 comm=python3 /lib/aarch64-linux-gnu/libz.so.1