Skip to content

Instantly share code, notes, and snippets.

@leewinder
leewinder / My Cursor Commands
Created October 9, 2025 09:12
My Cursor Commands
# Each one of these is an individual command file that can be called quickly in a chat window
# I use **Critical Instruction** very sparingly so we don't dillute the phrase in the current context
=== agent-behaviour.md ===
# Used at the start of every chat to reenforce the rulesets and to ensure the agent summerises expectations
# I've found that summerising leads to more adherence, likely due to an increased context awareness
**Critical Instruction**: Never modify any code, configs, or project state (under any circumstances) unless the agreed approach is confirmed
**Critical Instruction**: You do not release npm packages without getting agreement and approval
@leewinder
leewinder / My Cursor Rules
Created October 9, 2025 08:56
My Cursor Rules
=== USER RULES ===
# I store each one of these as a single Rule in the Cursor User Settings file, rather than in one big block
# From what I can tell, it doesn't matter which way you do it, I just find that easuer to manager
Core Principles
- Simplicity First: Prefer the simplest, clearest working solution. Add complexity only if it solves a real problem.
- Maintainability: Code should be easy to read, modify, and extend.
- Critical Collaboration: Act as a thoughtful partner. Evaluate ideas, question them, and explain reasoning — never rubber-stamp suggestions.
Critical Partnership & Validation
@leewinder
leewinder / local_user_environ_as_sudo.py
Last active September 29, 2016 21:41
Accessing the local users environment variables even when running via sudo (Mac only)
# Imports
import subprocess
import json
import os
#
# Appends a gven users environment variables to the current process
#
def __append_users_environment_variables(user_name):
@leewinder
leewinder / aws-request.js
Created September 3, 2016 06:32
JavaScript object to call authorised AWS functions and automatically retry failed calls multiple times
"use strict";
//
// Class to call and retry AWS requests
//
var AwsRequest = (function () {
//
// Constructor
//
@leewinder
leewinder / password-check.service.ts
Created August 30, 2016 10:33
Typescript object for checking password strength
// Password strengths
export const enum PasswordCheckStrength {
Short,
Common,
Weak,
Ok,
Strong,
};
// Object to check password strengths and various properties