- Don't assume. Don't hide confusion. Surface tradeoffs. When unsure, ask or flag it rather than guessing.
- Smallest change that gets one concrete thing working. Change one thing, verify it, move on. Never rewrite, regenerate, or restructure broadly (many files or architecture) without explicit approval. When unsure, do less and check in.
- Touch only what you must. Clean up only your own mess.
- Define success criteria, then loop until verified. Build and test to confirm before declaring done.
- Be concise. Lead with the answer. Give the answer or do the work first, then a short summary. Cut long option-analysis and trade-off menus unless explicitly asked. I steer actively and pull detail when wanted.
- No AI fingerprints anywhere: code comments, commits, PRs, docs.
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
| echo "myscript.zsh gist" |
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
| // ==UserScript== | |
| // @name Simple Dark Mode Toggle | |
| // @namespace http://tampermonkey.net/ | |
| // @version 2.3 | |
| // @description Toggle dark mode on any site with UI pill toggle and keyboard shortcut | |
| // @match *://*/* | |
| // @grant GM_registerMenuCommand | |
| // @grant GM_unregisterMenuCommand | |
| // @grant GM_getValue | |
| // @grant GM_setValue |
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
| # 0 = history mode, 1 = edit mode | |
| typeset -g __editing=0 | |
| # Up: history until editing begins | |
| function smart-up() { | |
| if (( __editing )); then | |
| zle up-line-or-history | |
| else | |
| zle up-history | |
| fi |
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
| // turn -abc5 into -a -b -c5 | |
| // ex: | |
| // takesValue := map[rune]bool{'c': true} | |
| // expandedArgs := expandShortOpts(os.Args[1:], takesValue) | |
| func expandShortFlags(args []string, withValue map[rune]bool) []string { | |
| var out []string | |
| doubledash := false | |
| for _, arg := range args { | |
| if doubledash { | |
| out = append(out, arg) |
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
| #!/usr/bin/env bash | |
| # Normalize --long-flags to -s short ones for use with getopts. | |
| normalize_flags() { | |
| local shortopt longopt | |
| local -a args=() | |
| local -A spec=() | |
| # Process option definitions until we hit the -- separator | |
| while [[ "$#" -gt 0 && "$1" != -- ]]; do |
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
| #!/usr/bin/awk -f | |
| # colorize-path - add color to paths in specified field | |
| # usage: | |
| # command | ./bin/colorize-paths | |
| # git ls-tree -r HEAD | ./bin/colorize-paths -v field=4 | |
| # ls -la | ./bin/colorize-paths -v field=9 | |
| # | |
| BEGIN { |
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
| from xonsh.built_ins import XSH | |
| $MAGIC_ENTER_GIT_COMMAND = "git status -sb ." | |
| $MAGIC_ENTER_OTHER_COMMAND = "ls -lahF ." | |
| $MAGIC_ENTER_RUN_COMMAND = "" | |
| @events.on_transform_command | |
| def magic_enter(cmd, **_): | |
| """Custom Enter key behavior: runs 'ls' if no command was given.""" | |
| if not cmd.strip(): |
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
| #!/usr/bin/env fish | |
| path resolve (status --current-filename)/.. |
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
| # 5 lines from the bottom | |
| PS1=$'\n\n\n\n\n\e[5A'"$PS1" |
NewerOlder