This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Auto-Generate Custom AI Git Commit Messages with Cursor | |
| When you commit without a message, a git hook calls an AI CLI tool to read your changes and write the message for you. | |
| ## How It Works | |
| 1. You run `git commit` with no `-m` message | |
| 2. Git runs the `prepare-commit-msg` hook | |
| 3. The hook sees the message is empty, grabs your staged diff, and pipes it to an AI CLI | |
| 4. The AI reads your diff + your commit style rules and writes the message |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ^+g:: ; CTRL+SHIFT+G hotkey | |
| { | |
| ChatGPTWinTitle := "ChatGPT" | |
| ; Check if a window with the title "ChatGPT" exists | |
| if WinExist(ChatGPTWinTitle) | |
| { | |
| ; If it exists, bring it to the foreground and activate it | |
| WinActivate | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const fs = require("fs"); | |
| const path = require("path"); | |
| // Utility to deep clone objects | |
| const deepClone = (obj) => JSON.parse(JSON.stringify(obj)); | |
| // Load the OpenAPI document | |
| const loadOpenApiSpec = (filePath) => { | |
| try { | |
| return JSON.parse(fs.readFileSync(filePath, "utf8")); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Directory Tree Generator | |
| param( | |
| [Parameter(Mandatory=$false)] | |
| [string]$RootPath = (Get-Location), | |
| [Parameter(Mandatory=$false)] | |
| [string]$OutputFile = "api-tree.list" | |
| ) | |
| # Default ignore patterns | |
| $defaultIgnorePatterns = @( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Check if running with administrator privileges | |
| $isAdmin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) | |
| if (-not $isAdmin) { | |
| # Relaunch the script with admin rights | |
| Start-Process powershell.exe -Verb RunAs -ArgumentList ("-File", $MyInvocation.MyCommand.Path) | |
| exit | |
| } | |
| # Define the Cursor executable path |