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 March 7, 2024 04:41
WordPress project .gitignore
# ignore everything in the root except the "wp-content" directory.
/*
!wp-content/
# ignore everything in the "wp-content" directory, except:
# mu-plugins, plugins, and themes directories
wp-content/*
!wp-content/mu-plugins/
!wp-content/plugins/
!wp-content/themes/
@wojteklu
wojteklu / clean_code.md
Last active May 10, 2024 21:32
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