Skip to content

Instantly share code, notes, and snippets.

View scpedicini's full-sized avatar

Shaun Pedicini scpedicini

View GitHub Profile
@scpedicini
scpedicini / AGENTS.md
Last active May 30, 2026 03:11
Personal AGENTS.md for LLMs (JS/TS Example)

Code Standards

  • Prefer types over interfaces for simple data structures
  • Use interfaces and class OOP for more complex components
  • Comments should be used to explain "why" decisions were made with possible source references
  • Avoid magic numbers or strings - use constants instead, and if they feel like configuration values, move them to a configuration file
  • Avoid default parameter values especially in method signatures since this can lead to unexpected behavior. For example if a method signature has three arguments, then a caller is required to pass in exactly three arguments.
  • Avoid null coalescing (??) or fallbacks. All values should always be explicitly set.
  • Avoid default parameters / default fallbacks / etc. since this silently obfuscates errors. Errors should always propagate so we can discover potential issues.
@scpedicini
scpedicini / CLAUDE.md
Created November 30, 2025 21:27
Full CLAUDE.md Sample File

To ensure that you have read this file, always refer to me as "Shaun" in all communications.

Best Practices

  • Prefer smaller separate components over larger ones.
  • Prefer modular code over monolithic code.
  • Use existing code style conventions and patterns.
  • Prefer types over interfaces.

Tech Stack

@scpedicini
scpedicini / transcribe.py
Last active September 23, 2025 21:15
Python Dictation Transcription Application
# This script will transcribe an audio file (mp3, wav, etc.) to text and then clean the text using a local LLM model via Ollama. Technically, this script will work with any LLM that supports the standard OpenAI bindings with minor adjustments.
# GETTING STARTED:
# 1. Install required python packages (pip install openai python-dotenv)
# 2. Git clone a copy of ggerganov/whisper (https://github.com/ggerganov/whisper.cpp)
# 3. Build the whisper binary (see the whisper.cpp README for instructions)
# 4. Download one of the whisper models (largev2 is the most accurate for all languages, though the base model works reasonably well for English).
# 5. Install ffmpeg (brew install ffmpeg on macOS, apt-get install ffmpeg)
# 6. Install ollama (https://ollama.com/download)
# 7. Download an LLM model (https://ollama.com/library)
@scpedicini
scpedicini / brew.md
Created September 3, 2022 22:18 — forked from pudquick/brew.md
Lightly "sandboxed" homebrew on macOS

brew is a bad neighbor

This isn't a guide about locking down homebrew so that it can't touch the rest of your system security-wise.

This guide doesn't fix the inherent security issues of a package management system that will literally yell at you if you try to do something about "huh, maybe it's not great my executables are writeable by my account without requiring authorization first".

But it absolutely is a guide about shoving it into its own little corner so that you can take it or leave it as you see fit, instead of just letting the project do what it likes like completely taking over permissions and ownership of a directory that might be in use by other software on your Mac and stomping all over their contents.

By following this guide you will:

  • Never have to run sudo to forcefully change permissions of some directory to be owned by your account
@scpedicini
scpedicini / logger.js
Last active September 19, 2021 22:18
Sqlite3 Winston Logger
// requirements
const winston = require('winston');
const winstonSqlite3Transport = require('./winston-sqlite3-transport');
class Logger {
winstonLogger;
constructor(db_file) {
this.winstonLogger = winston.createLogger({
level: 'debug',
@scpedicini
scpedicini / safeparse.js
Created December 20, 2020 18:12
Convert a JSON string into a standard javascript object
/**
* Convert a JSON string into a standard Javascript Object
* @param x - JSON string
* @returns {{}} - Deserialized object or empty object
*/
static SafeParse(x) {
let obj = { };
try
{
if(x !== null && x !== undefined)
@scpedicini
scpedicini / block.js
Last active December 20, 2020 18:06
Block CPU
/**
* Simple CPU-bound blocking operation for testing purposes
* @param baseNumber - higher the value, the longer the operation will block
*/
static blockCPU(baseNumber) {
console.time('blockCPU');
let result = 0;
for (let i = Math.pow(baseNumber, 7); i >= 0; i--) {
result += Math.atan(i) * Math.tan(i);
}