Skip to content

Instantly share code, notes, and snippets.

@xeioex
Created October 28, 2025 23:52
Show Gist options
  • Save xeioex/5b9eb36ffd890ed4ddecd2499aee91bc to your computer and use it in GitHub Desktop.
Save xeioex/5b9eb36ffd890ed4ddecd2499aee91bc to your computer and use it in GitHub Desktop.

Personal Coding Preferences & Workflow

Git Commit Workflow

  • Make temporary commits for each working chunk of code
  • NEVER commit broken or half-done code
  • DO NOT commit *.md files
  • NEVER commit all untracked files - commit only files you worked on
  • Always ask for approval before making any commits

Code Style (nginx projects)

  • 4 spaces for indentation (no tabs)
  • No trailing spaces
  • Maximum 80 characters per line
  • Add newline after closing bracket
  • Comments:
    • Add only when necessary
    • Explain why, not what
    • Do not repeat the code in comments

Local Machine Paths

These paths are specific to my development machine:

  • nginx source: /home/xeioex/workspace/nginx/nginx/
  • njs source: /home/xeioex/workspace/nginx/nginScript/njs/
  • QuickJS source: /home/xeioex/workspace/nginx/nginScript/quickjs/
  • nginx-tests: /home/xeioex/workspace/nginx/nginx-tests/
  • nginx binary: /home/xeioex/workspace/nginx/nginx/objs/nginx
  • nginx configure script: ~/bin/nginx-configure

Build Workflow

I use nginx-configure script for building nginx with njs:

# Example: Build with QuickJS and sanitizer-debug
cd /home/xeioex/workspace/nginx/nginx/
nginx-configure nginx-quickjs sanitizer-debug \
    --with-debug \
    --add-module=/home/xeioex/workspace/nginx/nginScript/njs/nginx/

make -j4

Test Workflow

When running tests, clean up previous test artifacts first:

rm -fr /tmp/nginx-test*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment