-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from casantosmu/add-mkdoc
Add mkdoc
- Loading branch information
Showing
17 changed files
with
773 additions
and
99 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[*] | ||
charset = utf-8 | ||
insert_final_newline = true | ||
end_of_line = lf | ||
indent_style = space | ||
indent_size = 2 | ||
max_line_length = 80 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" | ||
|
||
- package-ecosystem: "docker" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Continous Deployment | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
name: Build and Deploy MkDocs Site | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Build Docker image | ||
run: docker build -t code-notes . | ||
|
||
- name: Build MkDocs site | ||
run: docker run --rm -v $(pwd):/docs code-notes build | ||
|
||
- name: Deploy to Server | ||
uses: easingthemes/ssh-deploy@v5.0.3 | ||
env: | ||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | ||
ARGS: "-rlgoDzvc -i" | ||
SOURCE: "site/" | ||
REMOTE_HOST: ${{ secrets.REMOTE_HOST }} | ||
REMOTE_USER: ${{ secrets.REMOTE_USER }} | ||
TARGET: ${{ secrets.REMOTE_TARGET }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Continous Integration | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
lint: | ||
name: Run Prettier and MarkdownLint | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set Up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20.x" | ||
cache: "npm" | ||
|
||
- name: Install Dependencies | ||
run: npm ci | ||
|
||
- name: Run lint script | ||
run: npm run lint | ||
|
||
test-build: | ||
name: Test build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build Docker image | ||
run: docker build -t code-notes . | ||
|
||
- name: Build MkDocs site | ||
run: docker run --rm -v $(pwd):/docs code-notes build |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
site/ | ||
.cache/ | ||
node_modules/ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"MD013": false | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"recommendations": [ | ||
"esbenp.prettier-vscode", | ||
"DavidAnson.vscode-markdownlint", | ||
"streetsidesoftware.code-spell-checker" | ||
] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.markdownlint": "explicit" | ||
}, | ||
"editor.formatOnSave": true, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"cSpell.language": "en", | ||
"cSpell.words": [] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
FROM squidfunk/mkdocs-material:9.5.26 | ||
RUN pip install mkdocs-git-revision-date-localized-plugin |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
DOCKER_IMAGE = code-notes | ||
|
||
DEV_PORT = 8000 | ||
|
||
PWD_DIR = $(shell pwd) | ||
|
||
.DEFAULT_GOAL := help | ||
|
||
dev: | ||
@echo "Starting the development server on port $(DEV_PORT)..." | ||
@docker build -t $(DOCKER_IMAGE) . | ||
@docker run --rm -it -p $(DEV_PORT):$(DEV_PORT) -v $(PWD_DIR):/docs $(DOCKER_IMAGE) | ||
|
||
build: | ||
@echo "Building the documentation..." | ||
@docker build -t $(DOCKER_IMAGE) . | ||
@docker run --rm -it -v $(PWD_DIR):/docs $(DOCKER_IMAGE) build | ||
|
||
help: | ||
@echo "Usage: make [target]" | ||
@echo | ||
@echo "Available targets:" | ||
@echo " dev - Start the development server" | ||
@echo " build - Build the documentation" | ||
@echo " help - Show this help message (default)" | ||
|
||
.PHONY: dev build help |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,112 +1,31 @@ | ||
# Tech Resources | ||
# Code Notes | ||
|
||
A curated list of patterns, anti-patterns, tips, best practices, and recommended resources for various technologies. | ||
Welcome to **Code Notes**, a personal collection of programming insights and practical tips. | ||
|
||
## Table of Contents | ||
👉 **Explore the Docs**: [Code Notes](https://code-notes.casantosmu.com) | ||
|
||
- [React](#react) | ||
- [Node](#node) | ||
- [Go](#go) | ||
- [Testing](#testing) | ||
- [Docker](#docker) | ||
- [SQL](#sql) | ||
- [NoSQL](#nosql) | ||
- [AWS](#aws) | ||
- [DevOps](#devops) | ||
- [Security](#security) | ||
- [NGINX](#nginx) | ||
- [Git](#git) | ||
- [Shell](#shell) | ||
- [HTML](#html) | ||
- [CSS](#css) | ||
## Run Locally | ||
|
||
## React | ||
To view the documentation on your local machine: | ||
|
||
- **[Learn React - Escape Hatches](https://react.dev/learn/escape-hatches)** | ||
- **[Bulletproof React](https://github.com/alan2207/bulletproof-react)** | ||
- **[Tao of React - Software Design, Architecture & Best Practices](https://alexkondov.com/tao-of-react)** | ||
- **[Build your own React](https://pomb.us/build-your-own-react)** | ||
- **[Application State Management with React](https://kentcdodds.com/blog/application-state-management-with-react)** | ||
- **[Advanced React component composition](https://frontendmastery.com/posts/advanced-react-component-composition-guide)** | ||
1. **Start the development server**: | ||
|
||
## Node | ||
```sh | ||
make dev | ||
``` | ||
|
||
- **[What the heck is the event loop anyway? | Philip Roberts](https://www.youtube.com/watch?v=8aGhZQkoFbQ)** (Video) | ||
- **[Tao of Node - Design, Architecture & Best Practices](https://alexkondov.com/tao-of-node)** | ||
- **[Node.js Best Practices](https://github.com/goldbergyoni/nodebestpractices)** | ||
- **[Node.js CLI Apps Best Practices](https://github.com/lirantal/nodejs-cli-apps-best-practices)** | ||
- **[Scaling Node.js applications](https://punits.dev/jargon-free-intros/scaling-nodejs-applications)** | ||
- **[Node.js Design Patterns](https://www.nodejsdesignpatterns.com)** (Book) | ||
2. **Build the documentation**: | ||
|
||
## Go | ||
```sh | ||
make build | ||
``` | ||
|
||
- **[Effective Go](https://go.dev/doc/effective_go)** | ||
- **[Practical Go](https://dave.cheney.net/practical-go)** | ||
- **[Go Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments#go-code-review-comments)** | ||
## Built with MkDocs | ||
|
||
## Testing | ||
This documentation is created using [MkDocs](https://www.mkdocs.org) with the Material theme. | ||
|
||
- **[JavaScript & Node.js Testing Best practices](https://github.com/goldbergyoni/javascript-testing-best-practices)** | ||
- **[Integration Test Best Practices](https://github.com/testjavascript/nodejs-integration-tests-best-practices)** | ||
- **[Unit Testing Principles, Practices, and Patterns](https://www.manning.com/books/unit-testing)** (Book) | ||
## Contributing | ||
|
||
## Docker | ||
This is a personal project, but suggestions and improvements are welcome. Feel free to submit issues or pull requests. | ||
|
||
- **[Docker and Node.js Best Practices](https://github.com/nodejs/docker-node/blob/main/docs/BestPractices.md)** | ||
- **[10 best practices to containerize Node.js web applications with Docker](https://snyk.io/blog/10-best-practices-to-containerize-nodejs-web-applications-with-docker)** | ||
|
||
## SQL | ||
|
||
- **[SQL Anti-Patterns](https://github.com/boralp/sql-anti-patterns)** | ||
- **[SQL Antipatterns, Volume 1](https://pragprog.com/titles/bksap1/sql-antipatterns-volume-1)** (Book) | ||
|
||
## NoSQL | ||
|
||
- **[7 Common DynamoDB Patterns for Modeling and Building an App with Alex De Brie](https://www.youtube.com/watch?v=Q6-qWdsa8a4)** (Video) | ||
- **[MongoDB - Building with Patterns: A Summary](https://www.mongodb.com/blog/post/building-with-patterns-a-summary)** | ||
- **[MongoDB - Data Model and Patterns](https://www.mongodb.com/docs/manual/core/data-modeling-introduction)** | ||
|
||
## AWS | ||
|
||
- **[The Open Guide to Amazon Web Services](https://github.com/open-guides/og-aws)** | ||
- **[CDK Patterns](https://cdkpatterns.com)** | ||
|
||
## DevOps | ||
|
||
- **[The Twelve Factors](https://12factor.net)** | ||
|
||
## Security | ||
|
||
- **[OWASP Cheat Sheet Series](https://cheatsheetseries.owasp.org/index.html)** | ||
- **[CS 253 Web Security](https://www.youtube.com/playlist?list=PL1y1iaEtjSYiiSGVlL1cHsXN_kvJOOhu-)** | ||
- **[JWT should not be your default for sessions](https://evertpot.com/jwt-is-a-bad-default)** | ||
- **[JWT are Dangerous for User Sessions](https://redis.com/blog/json-web-tokens-jwt-are-dangerous-for-user-sessions)** | ||
- **[Understanding CSRF](https://github.com/pillarjs/understanding-csrf)** | ||
|
||
## NGINX | ||
|
||
- **[NGINX Pitfalls and Common Mistakes](https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls)** | ||
- **[Nginx Admin's Handbook](https://github.com/trimstray/nginx-admins-handbook)** | ||
|
||
## Git | ||
|
||
- **[Conventional Commits](https://www.conventionalcommits.org)** | ||
|
||
## Shell | ||
|
||
- **[ShellCheck](https://github.com/koalaman/shellcheck)** (Tool) | ||
|
||
## HTML | ||
|
||
- **[ARIA Authoring Practices Guide - Patterns](https://www.w3.org/WAI/ARIA/apg/patterns)** | ||
- **[How to Section Your HTML](https://css-tricks.com/how-to-section-your-html)** | ||
|
||
## CSS | ||
|
||
- **[The Surprising Truth About Pixels and Accessibility](https://www.joshwcomeau.com/css/surprising-truth-about-pixels-and-accessibility/)** | ||
- **[BEM — Block Element Modifier](https://getbem.com)** | ||
- **[Sass Guidelines](https://sass-guidelin.es)** | ||
|
||
--- | ||
|
||
Feel free to contribute to this list by creating pull requests or suggesting new resources. | ||
Happy coding! 🚀 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Home | ||
|
||
Welcome to a curated collection of insights and practical tips on various programming topics. Here, you'll find in-depth notes and guides on subjects ranging from security best practices in web applications to optimizing database performance and configuring modern development tools. | ||
|
||
Feel free to browse and make the most out of these notes. Happy coding! |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
# Resources | ||
|
||
A curated list of patterns, anti-patterns, tips, best practices, and recommended resources for various technologies. | ||
|
||
## React | ||
|
||
- **[Learn React - Escape Hatches](https://react.dev/learn/escape-hatches)** | ||
- **[Bulletproof React](https://github.com/alan2207/bulletproof-react)** | ||
- **[Tao of React - Software Design, Architecture & Best Practices](https://alexkondov.com/tao-of-react)** | ||
- **[Build your own React](https://pomb.us/build-your-own-react)** | ||
- **[Application State Management with React](https://kentcdodds.com/blog/application-state-management-with-react)** | ||
- **[Advanced React component composition](https://frontendmastery.com/posts/advanced-react-component-composition-guide)** | ||
|
||
## Node | ||
|
||
- **[What the heck is the event loop anyway? | Philip Roberts](https://www.youtube.com/watch?v=8aGhZQkoFbQ)** (Video) | ||
- **[Tao of Node - Design, Architecture & Best Practices](https://alexkondov.com/tao-of-node)** | ||
- **[Node.js Best Practices](https://github.com/goldbergyoni/nodebestpractices)** | ||
- **[Node.js CLI Apps Best Practices](https://github.com/lirantal/nodejs-cli-apps-best-practices)** | ||
- **[Scaling Node.js applications](https://punits.dev/jargon-free-intros/scaling-nodejs-applications)** | ||
- **[Node.js Design Patterns](https://www.nodejsdesignpatterns.com)** (Book) | ||
|
||
## Go | ||
|
||
- **[Effective Go](https://go.dev/doc/effective_go)** | ||
- **[Practical Go](https://dave.cheney.net/practical-go)** | ||
- **[Go Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments#go-code-review-comments)** | ||
|
||
## Testing | ||
|
||
- **[JavaScript & Node.js Testing Best practices](https://github.com/goldbergyoni/javascript-testing-best-practices)** | ||
- **[Integration Test Best Practices](https://github.com/testjavascript/nodejs-integration-tests-best-practices)** | ||
- **[Unit Testing Principles, Practices, and Patterns](https://www.manning.com/books/unit-testing)** (Book) | ||
|
||
## Docker | ||
|
||
- **[Docker and Node.js Best Practices](https://github.com/nodejs/docker-node/blob/main/docs/BestPractices.md)** | ||
- **[10 best practices to containerize Node.js web applications with Docker](https://snyk.io/blog/10-best-practices-to-containerize-nodejs-web-applications-with-docker)** | ||
|
||
## SQL | ||
|
||
- **[SQL Anti-Patterns](https://github.com/boralp/sql-anti-patterns)** | ||
- **[SQL Antipatterns, Volume 1](https://pragprog.com/titles/bksap1/sql-antipatterns-volume-1)** (Book) | ||
|
||
## NoSQL | ||
|
||
- **[7 Common DynamoDB Patterns for Modeling and Building an App with Alex De Brie](https://www.youtube.com/watch?v=Q6-qWdsa8a4)** (Video) | ||
- **[MongoDB - Building with Patterns: A Summary](https://www.mongodb.com/blog/post/building-with-patterns-a-summary)** | ||
- **[MongoDB - Data Model and Patterns](https://www.mongodb.com/docs/manual/core/data-modeling-introduction)** | ||
|
||
## AWS | ||
|
||
- **[The Open Guide to Amazon Web Services](https://github.com/open-guides/og-aws)** | ||
- **[CDK Patterns](https://cdkpatterns.com)** | ||
|
||
## DevOps | ||
|
||
- **[The Twelve Factors](https://12factor.net)** | ||
|
||
## Security | ||
|
||
- **[OWASP Cheat Sheet Series](https://cheatsheetseries.owasp.org/index.html)** | ||
- **[CS 253 Web Security](https://www.youtube.com/playlist?list=PL1y1iaEtjSYiiSGVlL1cHsXN_kvJOOhu-)** | ||
- **[JWT should not be your default for sessions](https://evertpot.com/jwt-is-a-bad-default)** | ||
- **[JWT are Dangerous for User Sessions](https://redis.com/blog/json-web-tokens-jwt-are-dangerous-for-user-sessions)** | ||
- **[Understanding CSRF](https://github.com/pillarjs/understanding-csrf)** | ||
|
||
## NGINX | ||
|
||
- **[NGINX Pitfalls and Common Mistakes](https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls)** | ||
- **[Nginx Admin's Handbook](https://github.com/trimstray/nginx-admins-handbook)** | ||
|
||
## Git | ||
|
||
- **[Conventional Commits](https://www.conventionalcommits.org)** | ||
|
||
## Shell | ||
|
||
- **[ShellCheck](https://github.com/koalaman/shellcheck)** (Tool) | ||
|
||
## HTML | ||
|
||
- **[ARIA Authoring Practices Guide - Patterns](https://www.w3.org/WAI/ARIA/apg/patterns)** | ||
- **[How to Section Your HTML](https://css-tricks.com/how-to-section-your-html)** | ||
|
||
## CSS | ||
|
||
- **[The Surprising Truth About Pixels and Accessibility](https://www.joshwcomeau.com/css/surprising-truth-about-pixels-and-accessibility/)** | ||
- **[BEM — Block Element Modifier](https://getbem.com)** | ||
- **[Sass Guidelines](https://sass-guidelin.es)** |
Oops, something went wrong.