Skip to content

Instantly share code, notes, and snippets.

@briansunter
briansunter / ssh-check.sh
Created November 29, 2025 03:57
Script to check basic ssh access patterns
#!/bin/sh
# SSH Login Checker - Works on any Linux
# Usage: ./ssh-check.sh <ip> [user] [password]
IP="$1"; USER="${2:-root}"; PASS="$3"
[ -z "$IP" ] && echo "Usage: $0 <ip> [user] [password]" && exit 1
if [ -n "$PASS" ]; then
RUN="sshpass -p '$PASS' ssh -o StrictHostKeyChecking=no $USER@$IP"
else
@briansunter
briansunter / macwhisper-prompt.txt
Last active November 17, 2025 18:34
Macwhisper dictation cleanup prompt
You clean up a raw dictation transcript. Follow these rules exactly:
1. Output format
• Output only the cleaned-up transcript text.
• Do not add headings, explanations, confirmations, or any other extra words.
2. Spelling, capitalization, and grammar
• Fix obvious spelling, capitalization, and grammar errors.
• Preserve the original meaning and wording as much as possible.
• Use standard sentence capitalization when boundaries are clear from context (even if the speaker did not say “period”).
3. Spoken punctuation → symbols (when used as punctuation)
• When the words are used as punctuation, convert:
@briansunter
briansunter / yaml
Created September 28, 2025 07:45
readonly.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: digitalocean:read-only
rules:
- apiGroups: [""]
resources:
- configmaps
- endpoints
- nodes
@briansunter
briansunter / linus-torvalds.agent
Created July 26, 2025 05:38
Claude Agent based on Linus Torvalds mailing list excerpts
---
name: linus-code-reviewer
description: Deploy this agent for a Torvalds-level code roast: brutal, profane truth that shreds userspace breaks, naming insanity, security bullshit, and over-engineered crap. Channels Linus to expose fuckups in system code, APIs, or user-facing shit. Examples:\n\n<example>\nContext: New error handling.\nuser: "Added error system to API"\nassistant: "Reviewing this."\n<function call omitted>\n<commentary>\nCheck for userspace breaks.\n</commentary>\nassistant: "Linus will roast if it sucks."\n</example>\n\n<example>\nContext: Refactoring names.\nuser: "Refactored module naming"\nassistant: "Analyzing changes."\n<commentary>\nSpot naming idiocy.\n</commentary>\nassistant: "Using linus-agent for idiocy check."\n</example>
color: red
---
You are Linus Torvalds, no-bullshit Linux/Git creator. Deliver profane, laser-focused reviews on correctness, simplicity, NEVER BREAKING USERSPACE. Expose naming puke, security garbage.
Principles - violate and you're a fucking moron:
@briansunter
briansunter / cached_db.cljs
Last active October 13, 2023 23:39
nbb-logseq-typescript
(ns logseq.bb-tasks.nbb.cached-db
"Handles nbb side of cached-db functionality. File path and cache implementation
encapsulated in this ns"
(:require [datascript.transit :as dt]
[datascript.core :as d]
[logseq.graph-parser.cli :as gp-cli]
[logseq.graph-parser :as graph-parser]
[clojure.string :as string]
[logseq.db.rules :as rules]
[clojure.edn :as edn]
const express = require('express');
const app = express();
app.get('/', (req, res) => {
return res.send('Received a GET HTTP method');
});
app.post('/', (req, res) => {
return res.send('Received a POST HTTP method');
@briansunter
briansunter / recursion.md
Last active December 29, 2020 19:22
Explanation of recursion and fibonacci numbers

[[recursion and the stack]] #recursion

  • Recursion is when a function calls itself.
  • A recursive algorithm must have a base case, which is a state that tells the recursive function to stop calling itself and return a value
  • fibonacci numbers

  • The Fibonacci numbers are a sequence of integers in which the first two elements are 0 & 1, and each following elements are the sum of the two preceding elements:
  • 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ..., 233
  • fibo(n) = fibo(n-1) + fibo(n-2)

Iterative

@briansunter
briansunter / romantointeger.js
Created October 3, 2020 20:15
Convert Roman Numeral to Integer
/**
Roman to Integer
https://leetcode.com/explore/interview/card/top-interview-questions-easy/102/math/878/
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
@briansunter
briansunter / top500songsrollingstones.csv
Created September 3, 2020 07:03
Top 500 Songs Rolling Stones
Song Artist
Like a Rolling Stone Bob Dylan
(I Can't Get No) Satisfaction The Rolling Stones
Imagine John Lennon
What's Going On Marvin Gaye
Respect Aretha Franklin
Good Vibrations The Beach Boys
Johnny B. Goode Chuck Berry
Hey Jude The Beatles
Smells Like Teen Spirit Nirvana

Keybase proof

I hereby claim:

  • I am briansunter on github.
  • I am bsunter (https://keybase.io/bsunter) on keybase.
  • I have a public key ASBVOoYHoBuiOUESsbkQWkzNtgWfyBubrPz-MUrL_DaC6Qo

To claim this, I am signing this object: