Skip to content

Instantly share code, notes, and snippets.

View copyleftdev's full-sized avatar
🎯
Focusing

Don Johnson copyleftdev

🎯
Focusing
View GitHub Profile
@copyleftdev
copyleftdev / grep.md
Created August 24, 2024 07:00
The Ultimate Grep Command Guide

🔍 The Ultimate Grep Command Guide

🚀 Basic Usage

Command Description Example
grep pattern file 🔎 Search for a pattern in a file grep error logfile.txt
grep -i pattern file 🔠 Case-insensitive search grep -i ERROR logfile.txt
grep -w word file 🔤 Match whole words only grep -w error logfile.txt
grep -v pattern file ❌ Invert match (show lines that don't match) grep -v success logfile.txt
@copyleftdev
copyleftdev / sshkeys.md
Created August 24, 2024 07:03
The Ultimate Guide to Managing Multiple SSH Keys

🔐 The Ultimate Guide to Managing Multiple SSH Keys

🚀 Basic Concepts

  • 🔑 SSH keys consist of a public key and a private key
  • 📂 Keys are typically stored in ~/.ssh/
  • 🔒 Private keys should be kept secure and never shared
  • 📤 Public keys are added to remote servers or services

📊 Creating SSH Keys

@copyleftdev
copyleftdev / crawler_spec.md
Created August 27, 2024 03:20
Rust-Based Web Crawler with Kafka and PostgreSQL Integration - Design Specification

Rust-Based Web Crawler with Kafka and PostgreSQL Integration - Design Specification

1. Introduction

1.1 Overview

This document outlines the design specification for a high-performance Rust-based web crawler integrated with Apache Kafka and PostgreSQL. The crawler will act as a worker within a distributed system, consuming URLs from Kafka topics, crawling the associated web pages, and storing the results in a PostgreSQL database. Docker Compose will be utilized to manage the infrastructure, ensuring seamless deployment and orchestration of the services.

1.2 Objectives

  • Develop a high-performance web crawler using Rust that integrates with Kafka and PostgreSQL.
  • Ensure scalable crawling of up to 10 million websites.
@copyleftdev
copyleftdev / css.md
Created August 28, 2024 07:50
CSS Selector Cheat Sheet with Advanced Bitwise Operators

CSS Selector Cheat Sheet with Advanced Bitwise Operators

Basic Selectors

Selector Example Description
* * { } Selects all elements
elementname p { } Selects all <p> elements
.classname .intro { } Selects all elements with class="intro"
#idname #firstname { } Selects the element with id="firstname"
@copyleftdev
copyleftdev / fun.md
Created September 5, 2024 05:40
🖤 The Evil 'Ol Hacker's One-Liner Cheat Sheet 🖤

🖤 The Evil 'Ol Hacker's One-Liner Cheat Sheet 🖤

1. 🌀 Fork Bomb (Denial of Service)

Recursively spawns processes until the system crashes.

:(){ :|: & };:  # 🧨 Boom!
@copyleftdev
copyleftdev / test_cases.json
Created December 29, 2025 01:18
Proteus Deterministic Entropy Benchmark - Test Suite
[
{
"id": "cards_structure_seed_100_low_entropy",
"category": "structure",
"description": "Verify minimal card count at low entropy",
"url": "https://proteus-target.vercel.app/lab/cards?seed=100&entropy=0.1&profile=structure",
"parameters": {
"seed": 100,
"entropy": 0.1,
"profiles": [
@copyleftdev
copyleftdev / jq-cheatsheet.md
Created January 1, 2026 07:03
The Ultimate JQ Cheat Sheet - Comprehensive guide to jq command-line JSON processor
@copyleftdev
copyleftdev / github_traffic_stats.py
Created January 20, 2026 04:39
Fetch GitHub traffic stats (views/clones) for all your repositories using gh CLI
#!/usr/bin/env python3
"""Fetch GitHub traffic stats for all repositories using gh CLI."""
import json
import subprocess
import sys
from concurrent.futures import ThreadPoolExecutor, as_completed
def run_gh(args: list[str]) -> dict | list | None:
"""Run gh api command and return parsed JSON."""
@copyleftdev
copyleftdev / IOC_SUPPLEMENT.md
Last active March 29, 2026 04:45
Supplemental IOC & Infrastructure Intelligence — Toll Booth Phishing Deep Dive (follow-up to Ben Polonsky writeup)

Supplemental IOC & Infrastructure Intelligence

Toll Booth Phishing Campaign — Deep Dive Follow-Up

Context: This supplements Ben Polonsky's writeup with net-new findings from active infrastructure reconnaissance conducted 2026-03-28. All probing was passive/non-invasive against already-identified phishing infrastructure.


1. Backend Framework Identification

The article identified OpenResty 1.29.2.1 as the web server. Behind it sits a second layer:

@copyleftdev
copyleftdev / gist:0329753d659ea2cb5503ca6c1d6eb565
Created April 12, 2026 02:36
Palimpsest: The Six Laws (CLAUDE.md excerpt)
## The Six Laws (Never Break These)
1. **Determinism** — Frontier ordering is seed-driven. Retry logic is explicit. No hidden randomness anywhere. No `rand` in core paths — seeded PRNG only.
2. **Idempotence** — Same URL + same execution context = identical artifact hash.
3. **Content Addressability** — All artifacts are BLAKE3 hash-addressed. Deduplication is structural.
4. **Temporal Integrity** — Every capture binds wall clock + logical clock + crawl context + dependency chain.
5. **Replay Fidelity** — Stored artifacts must be sufficient to reconstruct the HTTP exchange, DOM state, and resource dependency graph.
6. **Observability as Proof** — Every decision is queryable. Every failure is replayable. Every artifact is verifiable.