Skip to content

Instantly share code, notes, and snippets.

View vanduc1102's full-sized avatar
πŸ›
πŸ’― πŸ’― πŸ’© πŸ˜† 🐒

Duke Nguyen vanduc1102

πŸ›
πŸ’― πŸ’― πŸ’© πŸ˜† 🐒
View GitHub Profile
@jasewarner
jasewarner / gitignore-for-wordpress-theme
Last active October 2, 2024 08:22
WordPress project .gitignore
# ignore everything in the root except the "wp-content" directory.
/*
!wp-content/
# ignore everything in the "wp-content" directory, except the themes directories
wp-content/*
!wp-content/themes/
# ignore all mu-plugins, plugins, and themes
# unless explicitly whitelisted at the end of this file
@wojteklu
wojteklu / clean_code.md
Last active April 18, 2025 12:16
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@gavinengel
gavinengel / magic-globals.js
Last active April 3, 2023 10:56
"Magic Globals" for node.js
// sets globals:
// __stack,
// __line,
// __file,
// __function,
// __ext,
// __base
// we already have these:
// __filename which gives as an example: /Users/mjr/example.js