diff --git a/.editorconfig b/.editorconfig
deleted file mode 100644
index 70c43d3475..0000000000
--- a/.editorconfig
+++ /dev/null
@@ -1,28 +0,0 @@
-root = true
-
-[*]
-tab_width = 2
-indent_size = 2
-charset = utf-8
-end_of_line = lf
-indent_style = space
-insert_final_newline = true
-trim_trailing_whitespace = true
-
-[*.txt]
-indent_size = false
-
-[test/fast/Listing versions/Running 'nvm ls' calls into nvm_alias]
-indent_size = false
-
-[test/fast/Listing versions/Running 'nvm ls --no-alias' does not call into nvm_alias]
-indent_size = false
-
-[test/fast/Unit tests/mocks/**]
-insert_final_newline = off
-
-[test/**/.urchin*]
-insert_final_newline = off
-
-[Makefile]
-indent_style = tab
diff --git a/.env.production b/.env.production
new file mode 100644
index 0000000000..a83a1d5831
--- /dev/null
+++ b/.env.production
@@ -0,0 +1,3 @@
+ALGOLIA_APP_ID=O6OT9G9U8Z
+ALGOLIA_API_KEY=b0cb3d390176e1ff4bd1ecb12fc15730
+ALGOLIA_INDEX_NAME=XXX
\ No newline at end of file
diff --git a/.github/workflows/azure-staticwebapp.yml b/.github/workflows/azure-staticwebapp.yml
new file mode 100644
index 0000000000..99bde11984
--- /dev/null
+++ b/.github/workflows/azure-staticwebapp.yml
@@ -0,0 +1,72 @@
+# This workflow will build and push a web application to an Azure Static Web App when you change your code.
+#
+# This workflow assumes you have already created the target Azure Static Web App.
+# For instructions see https://docs.microsoft.com/azure/static-web-apps/get-started-portal?tabs=vanilla-javascript
+#
+# To configure this workflow:
+#
+# 1. Set up a secret in your repository named AZURE_STATIC_WEB_APPS_API_TOKEN with the value of your Static Web Apps deployment token.
+# For instructions on obtaining the deployment token see: https://docs.microsoft.com/azure/static-web-apps/deployment-token-management
+#
+# 3. Change the values for the APP_LOCATION, API_LOCATION and APP_ARTIFACT_LOCATION, AZURE_STATIC_WEB_APPS_API_TOKEN environment variables (below).
+# For instructions on setting up the appropriate configuration values go to https://docs.microsoft.com/azure/static-web-apps/front-end-frameworks
+name: Deploy web app to Azure Static Web Apps
+
+on:
+ push:
+ branches:
+ - "master"
+ pull_request:
+ types: [opened, synchronize, reopened, closed]
+ branches:
+ - "master"
+
+# Environment variables available to all jobs and steps in this workflow
+env:
+ APP_LOCATION: "/" # location of your client code
+ API_LOCATION: "api" # location of your api source code - optional
+ APP_ARTIFACT_LOCATION: "build" # location of client code build output
+ AZURE_STATIC_WEB_APPS_API_TOKEN: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }} # secret containing deployment token for your static web app
+
+permissions:
+ contents: read
+
+jobs:
+ build_and_deploy_job:
+ permissions:
+ contents: read # for actions/checkout to fetch code
+ pull-requests: write # for Azure/static-web-apps-deploy to comment on PRs
+ if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
+ runs-on: ubuntu-latest
+ name: Build and Deploy Job
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ submodules: true
+ - name: Build And Deploy
+ id: builddeploy
+ uses: Azure/static-web-apps-deploy@v1
+ with:
+ azure_static_web_apps_api_token: ${{ env.AZURE_STATIC_WEB_APPS_API_TOKEN }} # secret containing api token for app
+ repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
+ action: "upload"
+ ###### Repository/Build Configurations - These values can be configured to match you app requirements. ######
+ # For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
+ app_location: ${{ env.APP_LOCATION }}
+ api_location: ${{ env.API_LOCATION }}
+ app_artifact_location: ${{ env.APP_ARTIFACT_LOCATION }}
+ ###### End of Repository/Build Configurations ######
+
+ close_pull_request_job:
+ permissions:
+ contents: none
+ if: github.event_name == 'pull_request' && github.event.action == 'closed'
+ runs-on: ubuntu-latest
+ name: Close Pull Request Job
+ steps:
+ - name: Close Pull Request
+ id: closepullrequest
+ uses: Azure/static-web-apps-deploy@v1
+ with:
+ azure_static_web_apps_api_token: ${{ env.AZURE_STATIC_WEB_APPS_API_TOKEN }} # secret containing api token for app
+ action: "close"
diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml
index 70932bf142..845a2eb570 100644
--- a/.github/workflows/label.yml
+++ b/.github/workflows/label.yml
@@ -9,6 +9,7 @@ name: Labeler
on: [pull_request]
jobs:
+<<<<<<< HEAD
label:
runs-on: ubuntu-latest
permissions:
@@ -19,3 +20,16 @@ jobs:
- uses: actions/labeler@v2
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
+=======
+ label:
+
+ runs-on: ubuntu-latest
+ permissions:
+ contents: read
+ pull-requests: write
+
+ steps:
+ - uses: actions/labeler@v4
+ with:
+ repo-token: "${{ secrets.GITHUB_TOKEN }}"
+>>>>>>> master
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 0000000000..2144002d13
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,26 @@
+on: push
+name: Build Gatsby Site
+jobs:
+ build:
+ name: Build Gatsby Site
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@master
+ - name: Build Gatsby Site
+ uses: jzweifel/gatsby-cli-github-action@master
+ with:
+ gatsby-arg: build
+on: push
+name: Build Gatsby Site in Subdirectory
+jobs:
+ build:
+ name: Build Gatsby Site
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@master
+ - name: Build Gatsby Site
+ uses: jzweifel/gatsby-cli-github-action@master
+ env:
+ GATSBY_PROJECT_PATH: "./"
+ with:
+ gatsby-arg: build
diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml
new file mode 100644
index 0000000000..de2dbe9453
--- /dev/null
+++ b/.github/workflows/makefile.yml
@@ -0,0 +1,27 @@
+name: Generate Documentation
+
+on: [push]
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Github Action genshdoc
+ id: action-genshdoc
+ uses: vargiuscuola/genshdoc@master
+ - name: genshdoc result
+ run: echo "The result of genshdoc Action was ${{ steps.action-genshdoc.outputs.result }}"
+ - name: Commit files
+ run: |
+ echo ${{ github.ref }}
+ git add .
+ git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
+ git config --local user.name "github-actions[bot]"
+ git commit -m "CI: Automated build push" -a | exit 0
+ - name: Push changes
+ if: github.ref == 'refs/heads/master'
+ uses: ad-m/github-push-action@master
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
\ No newline at end of file
diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml
new file mode 100644
index 0000000000..b80d85d364
--- /dev/null
+++ b/.github/workflows/pages.yml
@@ -0,0 +1,52 @@
+# Sample workflow for building and deploying a Gatsby site to GitHub Pages
+#
+# To get started with Gatsby see: https://www.gatsbyjs.com/docs/quick-start/
+#
+name: Deploy Gatsby site to Pages
+
+on:
+ # Runs on pushes targeting the default branch
+ push:
+ branches: ["master"]
+
+ # Allows you to run this workflow manually from the Actions tab
+ workflow_dispatch:
+
+# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
+permissions:
+ contents: read
+ pages: write
+ id-token: write
+
+# Allow one concurrent deployment
+concurrency:
+ group: "pages"
+ cancel-in-progress: true
+
+# Default to bash
+defaults:
+ run:
+ shell: bash
+
+jobs:
+ # Build job
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+ - name: Detect package manager
+ id: detect-package-manager
+ run: |
+ if [ -f "${{ github.workspace }}/package.json" ]; then
+ echo "::set-output name=manager::npm"
+ echo "::set-output name=command::ci"
+ exit 0
+ else
+ echo "Unable to determine packager manager"
+ exit 1
+ fi
+ - name: Setup Node
+ uses: actions/setup-node@v3
+ with:
+ node-version: "14"
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
new file mode 100644
index 0000000000..62452f8e94
--- /dev/null
+++ b/.github/workflows/stale.yml
@@ -0,0 +1,26 @@
+# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
+#
+# You can adjust the behavior by modifying this file.
+# For more information, see:
+# https://github.com/actions/stale
+name: Mark stale issues and pull requests
+
+on:
+ schedule:
+ - cron: "25 1 * * *"
+
+jobs:
+ stale:
+ runs-on: ubuntu-latest
+ permissions:
+ issues: write
+ pull-requests: write
+
+ steps:
+ - uses: actions/stale@v5
+ with:
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
+ stale-issue-message: "Stale issue message"
+ stale-pr-message: "Stale pull request message"
+ stale-issue-label: "no-issue-activity"
+ stale-pr-label: "no-pr-activity"
diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml
new file mode 100644
index 0000000000..acee01e2b2
--- /dev/null
+++ b/.github/workflows/super-linter.yml
@@ -0,0 +1,29 @@
+# This workflow executes several linters on changed files based on languages used in your code base whenever
+# you push a code or open a pull request.
+#
+# You can adjust the behavior by modifying this file.
+# For more information, see:
+# https://github.com/github/super-linter
+name: Lint Code Base
+
+on:
+ push:
+ branches: [ "master" ]
+ pull_request:
+ branches: [ "master" ]
+jobs:
+ run-lint:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v3
+ with:
+ # Full git history is needed to get a proper list of changed files within `super-linter`
+ fetch-depth: 0
+
+ - name: Lint Code Base
+ uses: github/super-linter@v4
+ env:
+ VALIDATE_ALL_CODEBASE: false
+ DEFAULT_BRANCH: "master"
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.gitignore b/.gitignore
index de010e39bd..e79440f493 100644
--- a/.gitignore
+++ b/.gitignore
@@ -77,8 +77,12 @@ typings/
# gatsby files
+<<<<<<< HEAD
# .cache/
# public
+=======
+
+>>>>>>> master
# Mac files
.DS_Store
@@ -91,8 +95,13 @@ yarn-error.log
.yarn-integrity
node_modules/
+public/
+.cache/
+<<<<<<< HEAD
.package-lock.json
*.cache
*public
src/pages/docs/tools/Archive.md
+=======
+>>>>>>> master
diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile
new file mode 100644
index 0000000000..579ceb2f87
--- /dev/null
+++ b/.gitpod.Dockerfile
@@ -0,0 +1,4 @@
+
+FROM gitpod/workspace-full
+
+RUN npm -g install gatsby-dev-cli
diff --git a/.markdownlint.json b/.markdownlint.json
deleted file mode 100644
index 1f609ed928..0000000000
--- a/.markdownlint.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "default": true,
- "MD026/":false,
- "MD013": false,
- "MD033":false,
- "MD02":false,
- "MD024":false,
- "MD030":false,
- "MD022":false,
- "MD001":false,
- "MD003":false,
- "MD029": false,
- "MD007": { "indent": 4 },
- "no-hard-tabs": false
-}
diff --git a/.node-version b/.node-version
new file mode 100644
index 0000000000..654afc8e19
--- /dev/null
+++ b/.node-version
@@ -0,0 +1 @@
+14.7.0
diff --git a/docs/content/cheat-sheets/react-cheatsheet.md b/.npmignore
similarity index 100%
rename from docs/content/cheat-sheets/react-cheatsheet.md
rename to .npmignore
diff --git a/.npmrc b/.npmrc
index 3ce2c41f93..5d35b284eb 100644
--- a/.npmrc
+++ b/.npmrc
@@ -1 +1 @@
-{ "engines" : { "node" : ">=0.15" } }
+{ "engines" : { "node" : ">=0.14" } }
diff --git a/.vscode/PythonImportHelper-v2-Completion.json b/.vscode/PythonImportHelper-v2-Completion.json
index 9551807b01..4871108954 100644
--- a/.vscode/PythonImportHelper-v2-Completion.json
+++ b/.vscode/PythonImportHelper-v2-Completion.json
@@ -1,8 +1,6 @@
-[
- {
- "label": "Flask",
- "importPath": "flask",
- "description": "flask",
+[{
+ "label": "argparse",
+ "kind": 6,
"isExtraImport": true,
"detail": "flask",
"documentation": {}
diff --git a/HelloNetlifyGraph.md b/HelloNetlifyGraph.md
deleted file mode 100644
index 5524b8df7f..0000000000
--- a/HelloNetlifyGraph.md
+++ /dev/null
@@ -1 +0,0 @@
-Thank you for checking out Netlify Graph, we hope you like it!
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index b42dc482c2..0000000000
--- a/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2021 Bryan C Guner
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/LICENSE.md b/LICENSE.md
new file mode 100644
index 0000000000..8ff8459161
--- /dev/null
+++ b/LICENSE.md
@@ -0,0 +1,40 @@
+# License Agreement
+##### Version 1.02 (02/14/2019)
+
+This Single Project License Agreement (**“Agreement”**) is between you and Stackbit Inc., a Delaware corporation (“Stackbit”) and governs Your right to use the website project including website theme and other media content (the "Project") obtained from or generated using our services available at www.stackbit.com (the "Services"). By clicking on the “Create Account” button (or any similar button) that is presented to you at the time of sign-up or by using the Site to generate a Project, you indicate that you agree to the terms and conditions of this Agreement. If You are accepting this Agreement on behalf of Your employer or other organization, You are agreeing to these terms for the entity and You represent and warrant that You have authority to bind such entity (party bound to this Agreement is referred to as “You”).
+
+1. **Definitions**. The capitalized terms shall have the meaning given in the relevant paragraph where such term is defined. In addition, the following terms shall have the meaning set forth below.
+
+ **“Client"** means the person or entity whose website you are designing if you are a web developer, web designer, agency or a marketing agent.
+
+ **“Theme”** means the website theme made available on the Site and generated using the Services, in HTML/JS/CSS electronic source code format together with any related developer documentation.
+
+ **“Project”** means any work that includes a Theme or that is derived from or is a ‘derivative work’ of a Theme, as such terms are used under the United States Copyright Act of 1976, as amended.
+
+2. **License**. Subject to the terms and conditions of this Agreement, Stackbit hereby grants you a perpetual, non-exclusive, non-transferable, non-sublicensable limited license to use, modify, and display the Theme only as incorporated in a single Project as set forth in Section 3 below. All rights not granted herein are expressly reserved by Stackbit.
+
+3. **Permitted Use**
+
+ You may use the Theme as it is incorporated into a single Project, either your own Project or the Project of your Client, and You may make modifications to the Theme necessary to fit the requirements of the Project provided that the Project and the use of the Project by You or the Client remains subject to this Agreement. You will own the Project you create, but Stackbit retains all right, title and interest in and to the Theme and other media content that are incorporated in your Project. You must retain and include all copyright notices and the terms of this License without modification in the files of the Project. You and Client must use the Project in compliance with all applicable federal, state and local laws, rules and regulations.
+
+4. **Prohibited Uses**
+
+ You may not, and shall not permit anyone else to, use the Project or do anything with the Project that is not expressly permitted by this Agreement, including, but not limited to, the following strictly prohibited uses:
+
+ 1. resell, sublicense or other transfer the Project or the Theme or other components thereof or your rights to use the Theme as set forth herein or otherwise make available or allows a person to access or reproduce the Theme as an electronic file, except in connection with the single Project and subject to Section 3 above;
+
+ 2. Use, reproduce or display the Theme or Project in any manner that competitive with the Services or our business (e.g. inclusion as part of an online website builder service, or distribution outside the Services such as on a Theme/themes marketplace or a "freebies" website);
+
+ 3. Use, reproduce or display of the Theme in a fashion that we consider as, or under applicable law is considered, pornographic, obscene, immoral, infringing, defamatory or libelous; and
+
+ 4. Use or display of the Theme in an electronic format that enables it to be downloaded or distributed in any file sharing arrangement.
+
+5. **Ownership**. Stackbit shall retain and own all right, title and interest, including but not limited to copyright, patent, trade secret and all other intellectual property rights, in and to the Themes. You shall own all right, title and interest, including but not limited to copyright, patent, trade secret and all other intellectual property rights, in and to the Project, subject to Stackbit’s ownership of the Theme and the terms of this license agreement.
+
+6. **Term and Termination**. This Agreement shall commence on the deployment of a Project through Stackbit’s Services to a repository (such as for example to Github) and continue indefinitely until it is terminated in accordance with Section 6. Stackbit may terminate this Agreement if You breach the Agreement and such breach remains uncured for 15 days following Your receipt of written notice from Stackbit. You may terminate this Agreement for convenience and without cause at any time immediately upon written notice to Stackbit. Upon termination of this Agreement for any reason, You and your Client shall a) cease all use of the Theme and the Project b) destroy or delete all copies and archives of the Theme, Projects, and accompanying materials, and c) if requested, confirm to Stackbit in writing that you have complied with these requirements. Any provisions of this Agreement which expressly or by implication are intended to survive its termination will survive and continue to bind the parties.
+
+7. **Warranty and Disclaimer**. THE SERVICES, SITE, THEME, PROJECT AND ALL CONTENT AVAILABLE THROUGH THE SITE ARE OFFERED “AS IS” AND WITHOUT WARRANTY, AND STACKBIT MAKES NO REPRESENTATION OR WARRANTY OF ANY KIND, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, AND SPECIFICALLY DISCLAIMS ALL WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE.
+
+8. **Limitation of Liability**. Stackbit’s aggregate liability for all claims, losses, liabilities or damages in connection with this Services, Theme, Project or this Agreement or its subject matter, whether as a result of breach of contract, tort (including negligence) or otherwise, regardless of the theory of liability asserted, is limited to no more than the total amount of fees paid to Stackbit under this Agreement, or $100, whichever is greater. In addition, Stackbit will not be liable in any event for lost profits, consequential, indirect, punitive, exemplary or special damages.
+
+9. **General**. This Agreement shall be governed by the law of the State of California, without reference to conflict of laws principles. The United Nations Convention on contracts for the International Sales of Goods shall not apply. This Agreement, together with the Stackbit Terms of Service at www.stackbit.com/tos/ represents the entire agreement between the parties with regard to the subject matter thereof and supersedes any prior understandings, proposals or agreements concerning the same subject matter. If any provision of this Agreement is found to be unenforceable or invalid, the remainder of such provision shall be enforced to the maximum extent permitted by law. No amendment or modification of this Agreement shall be valid or binding unless in a writing signed by representatives of both parties. You may not assign this Agreement without Stackbit’s prior written consent. Any attempted assignment in violation of this shall be null and void. This Agreement shall be binding upon and inure to the benefit of the parties hereto and their respective permitted successors and assigns. Any notice required or permitted to be given by either party under this Agreement shall be in writing and may be sent via an active Services account dashboard or shall be personally delivered or sent by commercial courier service, or by first class mail (certified or registered if available), or by telecopy confirmed by first class mail (registered or certified if available), to the other party at its address set forth below, or such new address as may from time-to-time be supplied hereunder by the parties hereto.
diff --git a/README.md b/README.md
index 354a04ea98..ec86fc5869 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,11 @@
---
+<<<<<<< HEAD
+=======
+### [CHANGELOG](./CHANGELOG.md)
+>>>>>>> master
@@ -25,11 +29,15 @@
[![Netlify Status](https://api.netlify.com/api/v1/badges/a1b7ee1a-11a7-4bd2-a341-2260656e216f/deploy-status)](https://app.netlify.com/sites/bgoonz-blog/deploys)[![CodeFactor](https://www.codefactor.io/repository/github/bgoonz/bgoonz_blog_2.0/badge)](https://www.codefactor.io/repository/github/bgoonz/bgoonz_blog_2.0)
-
![GitHub visitors](https://visitor-badge-reloaded.herokuapp.com/badge?page_id=bgoonz.visitor.badge.reloaded&color=00bbbb&style=for-the-badge&logo=github)
+[![Deploy Gatsby site to Pages](https://github.com/DUKE42web/BGOONZ_BLOG_2.0/actions/workflows/pa7ges.yml/badge.svg?branch=master&event=deployment)](https://github.com/DUKE42web/BGOONZ_BLOG_2.0/actions/workflows/pa7ges.yml)
+[![Lint Code Base](https://github.com/bgoonz/BGOONZ_BLOG_2.0/actions/workflows/super-linter.yml/badge.svg)](https://github.com/bgoonz/BGOONZ_BLOG_2.0/actions/workflows/super-linter.yml)
+
+[![Deploy Gatsby site to Pages](https://github.com/bgoonz/BGOONZ_BLOG_2.0/actions/workflows/pages.yml/badge.svg)](https://github.com/bgoonz/BGOONZ_BLOG_2.0/actions/workflows/pages.yml)
---
+<<<<<<< HEAD
![preview](https://github.com/bgoonz/BGOONZ_BLOG_2.0/blob/master/static/images/blog-preview.png?raw=true)
@@ -39,9 +47,375 @@
![Foo](https://github.com/bgoonz/BGOONZ_BLOG_2.0/blob/master/static/images/Screenshot%202022-03-30%20at%2012-37-24%20Website%20Speed%20Test%20Tool%20-%20Testmysite.io%20by%20Netlify.png?raw=true)
+=======
+#### Branch Deploys
+
+##### [Preview](https://preview--bgoonz-blog.netlify.app/)
+
+##### [local](https://local--bgoonz-blog.netlify.app/)
+
+##### []()
+
+##### []()
+
+##### []()
+
+##### []()
+
+##### []()
+
+##### []()
+
+docky src/components/**/*.js --watch "src/components/**/*.js","./README.md" --ignore "src/components/**/index.js"
+
+---
+
+### Table Of Contents
+
+- [Bgoonz Blog Readme](#bgoonz-blog-readme)
+ - [⇨WEBSITE🗺️⇦](#website️)
+ - [CHANGELOG](#changelog)
+ - [⇨WEBSITE🗺️⇦ ⇨**Cloudfare-Backup**⇦ ⇨**search**⇦ ⇨**Backup Repo Deploy**⇦ ⇨**Github pages**⇦ ⇨**Go To Site Wiki**⇦ ⇨**Gatsby Cloud Version**⇦ ⇨**Vercel Version**⇦ ⇨**Cloudfare-Domain**⇦ ⇨**gh-pages**⇦ ⇨**backup netlify deploy**⇦](#website️-cloudfare-backup-search-backup-repo-deploy-github-pages-go-to-site-wiki-gatsby-cloud-version-vercel-version-cloudfare-domain-gh-pages-backup-netlify-deploy)
+ - [Repos](#repos)
+ - [⇨Privacy policy⇦](#privacy-policy)
+ - [](#)
+ - [Branch Deploys](#branch-deploys)
+ - [Preview](#preview)
+ - [local](#local)
+ - [](#-1)
+ - [](#-2)
+ - [](#-3)
+ - [](#-4)
+ - [](#-5)
+ - [](#-6)
+ - [Table Of Contents](#table-of-contents)
+ - [](#-7)
+ - [Useful Commands (internal use)](#useful-commands-internal-use)
+ - [Stable Points](#stable-points)
+ - [Links To Remember:](#links-to-remember)
+ - [Web Dev Setup](#web-dev-setup)
+ - [Basic Web Development Environment Setup](#basic-web-development-environment-setup)
+ - [Basic Web Development Environment Setup](#basic-web-development-environment-setup-1)
+ - [Windows Subsystem for Linux (WSL) and Ubuntu](#windows-subsystem-for-linux-wsl-and-ubuntu)
+ - [Test if you have Ubuntu installed by typing "Ubuntu" in the search box in the bottom app bar that reads "Type here to search". If you see a search result that reads **"Ubuntu 20.04 LTS"** with "App" under it, then you have it installed.](#test-if-you-have-ubuntu-installed-by-typing-ubuntu-in-the-search-box-in-the-bottom-app-bar-that-reads-type-here-to-search-if-you-see-a-search-result-that-reads-ubuntu-2004-lts-with-app-under-it-then-you-have-it-installed)
+ - [Git](#git)
+ - [Google Chrome](#google-chrome)
+ - [Node.js](#nodejs)
+ - [Unzip](#unzip)
+ - [Python 3](#python-3)
+ - [Note about WSL](#note-about-wsl)
+ - [Some other common instillations](#some-other-common-instillations)
+ - [](#-8)
+ - [Documentation Commands:](#documentation-commands)
+ - [documentation build src/components/ActionLink.js -f md\> ./notes/ActionLink.md](#documentation-build-srccomponentsactionlinkjs---f-md-notesactionlinkmd)
+ - [Blog Content:](#blog-content)
+ - [Bash Cheat Sheet (MY COMMANDS)](#bash-cheat-sheet-my-commands)
+ - [1. Remove spaces from file and folder names and then remove numbers from files and folder names](#1-remove-spaces-from-file-and-folder-names-and-then-remove-numbers-from-files-and-folder-names)
+ - [Description: need to : `sudo apt install rename`](#description-need-to--sudo-apt-install-rename)
+ - [code](#code)
+ - [2. Download Website Using Wget](#2-download-website-using-wget)
+ - [Description](#description)
+ - [code](#code-1)
+ - [3. Clean Out Messy Git Repo](#3-clean-out-messy-git-repo)
+ - [Description: recursively removes git related folders as well as internal use files / attributions in addition to empty folders](#description-recursively-removes-git-related-folders-as-well-as-internal-use-files--attributions-in-addition-to-empty-folders)
+ - [code](#code-2)
+ - [4. clone all of a user's git repositories](#4-clone-all-of-a-users-git-repositories)
+ - [Description: clone all of a user or organization's git repositories](#description-clone-all-of-a-user-or-organizations-git-repositories)
+ - [code](#code-3)
+ - [Generalized](#generalized)
+ - [Clone all Git User](#clone-all-git-user)
+ - [Clone all Git Organization](#clone-all-git-organization)
+ - [5. Git Workflow](#5-git-workflow)
+ - [Description](#description-1)
+ - [code](#code-4)
+ - [6. Recursive Unzip In Place](#6-recursive-unzip-in-place)
+ - [Description: recursively unzips folders and then deletes the zip file by the same name](#description-recursively-unzips-folders-and-then-deletes-the-zip-file-by-the-same-name)
+ - [code](#code-5)
+ - [7. git pull keeping local changes](#7-git-pull-keeping-local-changes)
+ - [Description](#description-2)
+ - [code](#code-6)
+ - [8. Prettier Code Formatter](#8-prettier-code-formatter)
+ - [Description](#description-3)
+ - [code](#code-7)
+ - [9. Pandoc](#9-pandoc)
+ - [Description](#description-4)
+ - [code](#code-8)
+ - [10. Gitpod Installs](#10-gitpod-installs)
+ - [Description](#description-5)
+ - [code](#code-9)
+ - [11. Repo Utils Package](#11-repo-utils-package)
+ - [Description: my standard repo utis package](#description-my-standard-repo-utis-package)
+ - [code](#code-10)
+ - [12. Unix Tree Package Usage](#12-unix-tree-package-usage)
+ - [Description](#description-6)
+ - [code](#code-11)
+ - [13. Find \& Replace string in file \& folder names recursively](#13-find--replace-string-in-file--folder-names-recursively)
+ - [Description](#description-7)
+ - [code](#code-12)
+ - [14. Remove double extensions](#14-remove-double-extensions)
+ - [Description](#description-8)
+ - [code](#code-13)
+ - [15. Truncate folder names down to 12 characters](#15-truncate-folder-names-down-to-12-characters)
+ - [Description: Truncate folder names down to 12 characters](#description-truncate-folder-names-down-to-12-characters)
+ - [code](#code-14)
+ - [16.Appendir.js](#16appendirjs)
+ - [Description: combine the contents of every file in the contaning directory](#description-combine-the-contents-of-every-file-in-the-contaning-directory)
+ - [code](#code-15)
+ - [17. Replace space in filename with underscore](#17-replace-space-in-filename-with-underscore)
+ - [Description: followed by replace `'#' with '_'` in directory name](#description-followed-by-replace--with-_-in-directory-name)
+ - [code](#code-16)
+ - [18. Filter \& delete files by name and extension](#18-filter--delete-files-by-name-and-extension)
+ - [Description](#description-9)
+ - [code](#code-17)
+ - [19. Remove lines containing string](#19-remove-lines-containing-string)
+ - [Description](#description-10)
+ - [code](#code-18)
+ - [20. Remove duplicate lines from a text file](#20-remove-duplicate-lines-from-a-text-file)
+ - [Description](#description-11)
+ - [code](#code-19)
+ - [21. Remove lines containing string](#21-remove-lines-containing-string)
+ - [Description](#description-12)
+ - [code](#code-20)
+ - [22. Zip directory excluding .git and node\_modules all the way down (Linux)](#22-zip-directory-excluding-git-and-node_modules-all-the-way-down-linux)
+ - [Descriptio: zip up an entire git directory](#descriptio-zip-up-an-entire-git-directory)
+ - [code](#code-21)
+ - [23. Delete files containing a certain string](#23-delete-files-containing-a-certain-string)
+ - [Description](#description-13)
+ - [code](#code-22)
+ - [24 Generate sitemap](#24-generate-sitemap)
+ - [Description](#description-14)
+ - [code](#code-23)
+ - [25. Index of Iframes](#25-index-of-iframes)
+ - [Description: Creates an index.html file that contains all the files in the working directory or any of it's sub folders as iframes instead of anchor tags](#description-creates-an-indexhtml-file-that-contains-all-the-files-in-the-working-directory-or-any-of-its-sub-folders-as-iframes-instead-of-anchor-tags)
+ - [code](#code-24)
+ - [26. Filter Corrupted Git Repo For Troublesome File](#26-filter-corrupted-git-repo-for-troublesome-file)
+ - [Description](#description-15)
+ - [code](#code-25)
+ - [27. OVERWRITE LOCAL CHANGES](#27-overwrite-local-changes)
+ - [Description](#description-16)
+ - [code](#code-26)
+ - [28. Remove Submodules](#28-remove-submodules)
+ - [Description: To remove a submodule you need to](#description-to-remove-a-submodule-you-need-to)
+ - [code](#code-27)
+ - [29. GET GISTS](#29-get-gists)
+ - [Description](#description-17)
+ - [code](#code-28)
+ - [30. Remove Remote OriginL](#30-remove-remote-originl)
+ - [Description](#description-18)
+ - [code](#code-29)
+ - [31. just clone .git folder](#31-just-clone-git-folder)
+ - [Description](#description-19)
+ - [code](#code-30)
+ - [32. Undo recent pull request](#32-undo-recent-pull-request)
+ - [Description](#description-20)
+ - [code](#code-31)
+ - [33. Lebab](#33-lebab)
+ - [Description: ES5 --\> ES6](#description-es5----es6)
+ - [code](#code-32)
+ - [34. Troubleshoot Ubuntu Input/Output Error](#34-troubleshoot-ubuntu-inputoutput-error)
+ - [Description: Open Powershell as Administrator](#description-open-powershell-as-administrator)
+ - [code](#code-33)
+ - [35. Export Medium as Markdown](#35-export-medium-as-markdown)
+ - [Description](#description-21)
+ - [code](#code-34)
+ - [36. Delete files in violation of a given size range (100MB for git)](#36-delete-files-in-violation-of-a-given-size-range-100mb-for-git)
+ - [Description](#description-22)
+ - [code](#code-35)
+ - [37. download all links of given file type](#37-download-all-links-of-given-file-type)
+ - [Description](#description-23)
+ - [code](#code-36)
+ - [38. Kill all node processes](#38-kill-all-node-processes)
+ - [Description](#description-24)
+ - [code](#code-37)
+ - [39. Remove string from file names recursively](#39-remove-string-from-file-names-recursively)
+ - [Description: In the example below I am using this command to remove the string "-master" from all file names in the working directory and all of it's sub directories](#description-in-the-example-below-i-am-using-this-command-to-remove-the-string--master-from-all-file-names-in-the-working-directory-and-all-of-its-sub-directories)
+ - [code](#code-38)
+ - [40. Remove spaces from file and folder names recursively](#40-remove-spaces-from-file-and-folder-names-recursively)
+ - [Description: replaces spaces in file and folder names with an `_` underscore](#description-replaces-spaces-in-file-and-folder-names-with-an-_-underscore)
+ - [code](#code-39)
+ - [41. Zip Each subdirectories in a given directory into their own zip file](#41-zip-each-subdirectories-in-a-given-directory-into-their-own-zip-file)
+ - [Description](#description-25)
+ - [code](#code-40)
+ - [91. Unzip PowerShell](#91-unzip-powershell)
+ - [Description](#description-26)
+ - [code](#code-41)
+ - [92. return to bash from zsh](#92-return-to-bash-from-zsh)
+ - [Description](#description-27)
+ - [code](#code-42)
+ - [93. Symbolic Link](#93-symbolic-link)
+ - [Description: to working directory](#description-to-working-directory)
+ - [code](#code-43)
+ - [94. auto generate readme](#94-auto-generate-readme)
+ - [Description: rename existing readme to blueprint.md](#description-rename-existing-readme-to-blueprintmd)
+ - [code](#code-44)
+ - [95. Log into postgres](#95-log-into-postgres)
+ - [Description](#description-28)
+ - [code](#code-45)
+ - [96. URL To Subscribe To YouTube Channel](#96-url-to-subscribe-to-youtube-channel)
+ - [| JavaScript libraries | Lodash ; Dojo ; core-js ; jQuery |](#-javascript-libraries--lodash--dojo--core-js--jquery-------------------------)
+ - [96. URL To Subscribe To YouTube Channel](#96-url-to-subscribe-to-youtube-channel-1)
+ - [Description](#description-29)
+ - [code](#code-46)
+ - [97. Embed Repl.it In Medium Post](#97-embed-replit-in-medium-post)
+ - [code](#code-47)
+ - [98 rRmove text target="parent" from files called right.html](#98-rrmove-text-targetparent-from-files-called-righthtml)
+ - [Description](#description-30)
+ - [code](#code-48)
+ - [99. Cheat Sheet](#99-cheat-sheet)
+ - [Description](#description-31)
+ - [code](#code-49)
+ - [Find](#find)
+ - [To find files by case-insensitive extension (ex: .jpg, .JPG, .jpG)](#to-find-files-by-case-insensitive-extension-ex-jpg-jpg-jpg)
+ - [To find directories](#to-find-directories)
+ - [To find files](#to-find-files)
+ - [To find files by octal permission](#to-find-files-by-octal-permission)
+ - [To find files with setuid bit set](#to-find-files-with-setuid-bit-set)
+ - [To find files with extension '.txt' and remove them](#to-find-files-with-extension-txt-and-remove-them)
+ - [To find files with extension '.txt' and look for a string into them](#to-find-files-with-extension-txt-and-look-for-a-string-into-them)
+ - [To find files with size bigger than 5 Mebibyte and sort them by size](#to-find-files-with-size-bigger-than-5-mebibyte-and-sort-them-by-size)
+ - [To find files bigger than 2 Megabyte and list them](#to-find-files-bigger-than-2-megabyte-and-list-them)
+ - [To find files modified more than 7 days ago and list file information](#to-find-files-modified-more-than-7-days-ago-and-list-file-information)
+ - [To find symlinks owned by a user and list file information](#to-find-symlinks-owned-by-a-user-and-list-file-information)
+ - [To search for and delete empty directories](#to-search-for-and-delete-empty-directories)
+ - [To search for directories named build at a max depth of 2 directories](#to-search-for-directories-named-build-at-a-max-depth-of-2-directories)
+ - [To search all files who are not in .git directory](#to-search-all-files-who-are-not-in-git-directory)
+ - [To find all files that have the same node (hard link) as MY\_FILE\_HERE](#to-find-all-files-that-have-the-same-node-hard-link-as-my_file_here)
+ - [To find all files in the current directory and modify their permissions](#to-find-all-files-in-the-current-directory-and-modify-their-permissions)
+ - [find . -type f -exec chmod 644 {} ;](#find---type-f--exec-chmod-644--)
+ - [](#-9)
+ - [Wiki Nav](#wiki-nav)
+ - [Dependencies](#dependencies)
+ - [](#-10)
+ - [Docs Structure](#docs-structure)
+ - [SITEMAP](#sitemap)
+ - [](#-11)
+- [](#-12)
+ - [🚀 Quick start](#-quick-start)
+ - [🧐 What's inside?](#-whats-inside)
+ - [🎓 Learning Gatsby](#-learning-gatsby)
+ - [💫 Deploy](#-deploy)
+ - [](#-13)
+ - [Gatsby With Netlify CMS](#gatsby-with-netlify-cms)
+ - [Prerequisites](#prerequisites)
+ - [Set up a Netlify CMS-managed Gatsby site in 5 steps](#set-up-a-netlify-cms-managed-gatsby-site-in-5-steps)
+ - [Step 1](#step-1)
+ - [Step 2](#step-2)
+ - [Step 3](#step-3)
+ - [Customizing your site](#customizing-your-site)
+ - [Step 4](#step-4)
+ - [Step 5](#step-5)
+ - [Benefits of Netlify CMS, GitHub, and Netlify Workflow](#benefits-of-netlify-cms-github-and-netlify-workflow)
+ - [You can learn more about Netlify CMS and how to configure it further in the Netlify CMS documentation](#you-can-learn-more-about-netlify-cms-and-how-to-configure-it-further-in-the-netlify-cms-documentation)
+ - [Gatsby Project Structure | Gatsby](#gatsby-project-structure--gatsby)
+ - [The file/folder structure described above reflects Gatsby-specific files and folders. Since Gatsby sites are also React apps, it's common to use standard React code organization patterns such as folders like `/components` and `/utils` inside `/src`. The React docs have more information on a typical React app folder structure.](#the-filefolder-structure-described-above-reflects-gatsby-specific-files-and-folders-since-gatsby-sites-are-also-react-apps-its-common-to-use-standard-react-code-organization-patterns-such-as-folders-like-components-and-utils-inside-src-the-react-docs-have-more-information-on-a-typical-react-app-folder-structure)
+ - [Layout Components | Gatsby](#layout-components--gatsby)
+ - [Excerpt](#excerpt)
+ - [Adding Markdown Pages | Gatsby](#adding-markdown-pages--gatsby)
+ - [](#-14)
+ - [Overview](#overview)
+ - [Syntax](#syntax)
+ - [Parameters](#parameters)
+ - [Return value](#return-value)
+ - [Example](#example)
+ - [Explanation](#explanation)
+ - [Output](#output)
+ - [Technoloy](#technoloy)
+ - [](#-15)
+ - [SOURCECODE](#sourcecode)
+ - [Overview](#overview-1)
+ - [Syntax](#syntax-1)
+ - [Parameters](#parameters-1)
+ - [Return value](#return-value-1)
+ - [Example](#example-1)
+ - [Explanation](#explanation-1)
+ - [Output](#output-1)
+ - [Source Code](#source-code)
+ - [Component Structure](#component-structure)
+ - [Table of Contents](#table-of-contents-1)
+ - [getPage](#getpage)
+ - [Parameters](#parameters-2)
+ - [getPageByFilePath](#getpagebyfilepath)
+ - [Parameters](#parameters-3)
+ - [getPages](#getpages)
+ - [Parameters](#parameters-4)
+ - [Examples](#examples)
+
+![preview](https://github.com/bgoonz/BGOONZ_BLOG_2.0/blob/master/static/images/blog-may-2022.png?raw=true)
+---
+
+## Useful Commands (internal use)
+
+```bash
+npm i @stackbit/gatsby-plugin-menus babel-runtime chokidar classnames fs-extra gatsby gatsby-image gatsby-plugin-netlify gatsby-plugin-netlify-cms gatsby-plugin-sass gatsby-plugin-react-helmet gatsby-plugin-typescript --legacy-peer-deps
+git checkout 307a5cd # check out the commit that you want to reset to
+git checkout -b fixy # create a branch named fixy to do the work
+git merge -s ours master # merge master's history without changing any files
+git checkout master # switch back to master
+git merge fixy # and merge in the fixed branch
+git push # done, no need to force push!
+```
+
+---
+
+## Stable Points
+
+- [stable 8-13-2021](https://github.com/bgoonz/BGOONZ_BLOG_2.0/commit/0c09a707f4bfddd974a31d97a4f8d716f1858ef8) or [or maybe](https://github.com/bgoonz/BGOONZ_BLOG_2.0/commit/68fba78e36fffcf21288ea0e90e1075bf31b2a82)
+- [Stable September 11](https://github.com/side-projects-42/BGOONZ_BLOG_2.0)
+- [October Stable](https://github.com/Web-Dev-Collaborative/october-stable)
+- [November 2021 stable](https://github.com/bgoonz/BGOONZ_BLOG_2.0/commit/9ae5da5813cc9b48d2a57c84cd32cf4309078524)
+- [Late November Stable](https://github.com/bgoonz/BGOONZ_BLOG_2.0/commit/40ecc95f000a848710c39e166961b8da7fca306b)
+- [December](https://github.com/bgoonz/BGOONZ_BLOG_2.0/tree/fc4a6ba1d61a3ef0b893cc5a44e41672547a3cc6)
+- [Late December](https://github.com/bgoonz/BGOONZ_BLOG_2.0/commit/848a8505eece492bfd9856eb63bd4acbee8bced6)
+- [Late Febuary](https://deploy-preview-1697--bgoonz-blog.netlify.app/)
+- [Late January](https://github.com/bgoonz/BGOONZ_BLOG_2.0/pull/1447)
+- [Good stable point](https://github.com/bgoonz/BGOONZ_BLOG_2.0/commit/90f70928a145c8a784899baf62efc2a0d5697bf4)
+- [Stable March 13th 2022](https://github.com/bgoonz/BGOONZ_BLOG_2.0/commit/c3f30229ac3dcd19ff54798227ce065c216e0c11)
+- [Stable March 13th 2022](https://github.com/bgoonz/BGOONZ_BLOG_2.0/commit/99db7b97282d7190556b2a1b1ac61d6d9c67f970)
+[netlify-deploy-preview](https://deploy-preview-2280--bgoonz-blog.netlify.app/docs/tools/)
+- [May fix](https://github.com/bgoonz/BGOONZ_BLOG_2.0/commit/736d38cdcdd3692d6a3bf1d5485ac2b0a3824d02)
+
+- [Syntax hilighting working most recent](https://github.com/bgoonz/BGOONZ_BLOG_2.0/tree/db4d36067c1483c079389f1bd0e456c473c56710)
+- [FINALLY FIXED](https://62b5863dd06870000889c5cf--bgoonz-blog.netlify.app/)
+
+- [Good deploy early Aug](https://github.com/bgoonz/BGOONZ_BLOG_2.0/commit/a6bb13adf39305b7292a88bb1b37bb4bb2e5e76c)
+
+---
+
+### Links To Remember:
+
+
+- [Algolia Search UI](https://www.algolia.com/interface-demos/6ed0c3de-f9e4-4cc8-a7b2-c6c7c979cc5e)
+- [Most recent stable commit](https://github.com/bgoonz/BGOONZ_BLOG_2.0/commit/2448c20614bfef5491240d7da5b5e5873db8b586)
+- [sitemap](https://www.xml-sitemaps.com/download/bgoonz-blog.netlify.app-ee43723d7/sitemap.xml?view=1)
+- [initial commit](https://github.com/bgoonz/BGOONZ_BLOG_2.0/commit/e8f12effd461b560b366ee0bde5231f2c1ce0a4c)
+- [Static Html Version](https://github.com/Archive-42/bgoonz-blog-static)
+- [commit pages](https://github.com/bgoonz/BGOONZ_BLOG_2.0/commits/master?after=496dfce7e627bc81c80f7c0b5c41ecf420500b4a+34&branch=master)
+- [alt blog contact page](https://bgoonz-blog-v3-0.netlify.app/contact/)
+- [Resource Archive](https://resourcerepo2.netlify.app/)
+- [starter](https://codesandbox.io/s/ecstatic-wozniak-gj31v?autoresize=1&expanddevtools=1&fontsize=12&hidenavigation=1&theme=dark)
+- [Instant Search Demo](https://codesandbox.io/s/magical-davinci-l4hq6)
+- [midway-commit](https://github.com/bgoonz/BGOONZ_BLOG_2.0/tree/92d88002bebcde66b47d8109222ac62c64fa9909)
+- [blog2.0 backups](https://gist.github.com/bgoonz/68203bca236305d93d75e87533c7e8b8)
+- [backup repo](https://github.com/bgoonz/BGOONZ_BLOG_2.0)
+- [Bookmark website](https://github.com/side-projects-42/superb-celery)
+- [stable stackbit](https://github.com/bgoonz/BGOONZ_BLOG_2.0/commit/69a617bbce1113e65390d90e0085be422e7f23e1)
+- [repl.it for questions](https://comments-3.bgoonz.repl.co/)
+- [rotate pages](https://random-static-html-deploys.netlify.app/rotate.html)
+- [More widgets](https://webdevhub-1.disqus.com/)
+
+
+
+
+
+---
+
+## Web Dev Setup
+>>>>>>> master
+
+<<<<<<< HEAD
Bash Commands
## My Commands
@@ -51,15 +425,27 @@
# To find files by case-insensitive extension (ex: .jpg, .jpg, .jpG)
find . -iname "\*.jpg"
+=======
+
+
+Web Dev Setup
+
+## Basic Web Development Environment Setup
+>>>>>>> master
# To find directories
+<<<<<<< HEAD
find . -type d
# To find files
+=======
+### Basic Web Development Environment Setup
+>>>>>>> master
find . -type f
+<<<<<<< HEAD
# To find files by octal permission
find . -type f -perm 777
@@ -128,34 +514,173 @@ find . -name "* *" -type f | rename 's/ /_/g'
```sh
```sh
-find $dir -type f | sed 's|\(.*/\)[^A-Z]*\([A-Z].*\)|mv \"&\" \"\1\2\"|' | sh
+=======
+
-for i in *.*; do mv "$i" "${i%-*}.${i##*.}"; done
+###### Test if you have Ubuntu installed by typing "Ubuntu" in the search box in the bottom app bar that reads "Type here to search". If you see a search result that reads **"Ubuntu 20.04 LTS"** with "App" under it, then you have it installed.
+```
+1. In the application search box in the bottom bar, type "PowerShell" to find the application named "Windows PowerShell"
+2. Right-click on "Windows PowerShell" and choose "Run as administrator" from the popup menu
+3. In the blue PowerShell window, type the following: `Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux`
+4. Restart your computer
+5. In the application search box in the bottom bar, type "Store" to find the application named "Microsoft Store"
+6. Click "Microsoft Store"
+7. Click the "Search" button in the upper-right corner of the window
+8. Type in "Ubuntu"
+9. Click "Run Linux on Windows (Get the apps)"
+10. Click the orange tile labeled **"Ubuntu"** Note that there are 3 versions in the Microsoft Store… you want the one just entitled 'Ubuntu'
+11. Click "Install"
+12. After it downloads, click "Launch"
+13. If you get the option, pin the application to the task bar. Otherwise, right-click on the orange Ubuntu icon in the task bar and choose "Pin to taskbar"
+14. When prompted to "Enter new UNIX username", type your first name with no spaces
+15. When prompted, enter and retype a password for this UNIX user (it can be the same as your Windows password)
+16. Confirm your installation by typing the command `whoami 'as in who-am-i'`followed by Enter at the prompt (it should print your first name)
+17. You need to update your packages, so type `sudo apt update` (if prompted for your password, enter it)
+18. You need to upgrade your packages, so type `sudo apt upgrade` (if prompted for your password, enter it)
+```
+### Git
+Git comes with Ubuntu, so there's nothing to install. However, you should configure it using the following instructions.
+Open an Ubuntu terminal if you don't have one open already.
+1. > You need to configure Git, so type `git config --global user.name "Your Name"` with replacing "Your Name" with your real name.
+2. > You need to configure Git, so type `git config --global user.email your@email.com` with replacing "your@email.com" with your real email.
+**Note: if you want git to remember your login credentials type:**
+ git config --global credential.helper store
+### Google Chrome
+Test if you have Chrome installed by typing "Chrome" in the search box in the bottom app bar that reads "Type here to search". If you see a search result that reads "Chrome" with "App" under it, then you have it installed. Otherwise, follow these instructions to install Google Chrome.
+### Node.js
+Test if you have Node.js installed by opening an Ubuntu terminal and typing `node --version`. If it reports "Command 'node' not found", then you need to follow these directions.
+1. > In the Ubuntu terminal, type `sudo apt update` and press Enter
+2. > In the Ubuntu terminal, type `sudo apt install build-essential` and press Enter
+3. > In the Ubuntu terminal, type `curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash` and press Enter
+4. > In the Ubuntu terminal, type `. ./.bashrc` and press Enter
+5. > In the Ubuntu terminal, type `nvm install --lts` and press Enter
+6. > Confirm that **node** is installed by typing `node --version` and seeing it print something that is not "Command not found"!
+### Unzip
+You will often have to download a zip file and unzip it. It is easier to do this from the command line. So we need to install a linux unzip utility.
+In the Ubuntu terminal type: `sudo apt install unzip` and press Enter
+Mocha.js
+Test if you have Mocha.js installed by opening an Ubuntu terminal and typing `which mocha`. If it prints a path, then you're good. Otherwise, if it prints nothing, install Mocha.js by typing `npm install -g mocha`.
+### Python 3
+Ubuntu does not come with Python 3. Install it using the command `sudo apt install python3`. Test it by typing `python3 --version` and seeing it print a number.
+### Note about WSL
+As of the time of writing of this document, WSL has an issue renaming or deleting files if Visual Studio Code is open. So before doing any linux commands which manipulate files, make sure you **close** Visual Studio Code before running those commands in the Ubuntu terminal.
+### Some other common instillations
+```bash
+ # Installing build essentials
+ sudo apt-get install -y build-essential libssl-dev
+ # Nodejs and NVM
+ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
+ source ~/.profile
+ sudo nvm install 7.10.0
+ sudo nvm use 7.10.0
+ node -v
+ #nodemon
+ sudo npm install -g nodemon
+ sudo npm install -g loopback-cli
+ # Forever to run nodejs scripts forever
+ sudo npm install forever -g
+ # Git - a version control system
+ sudo apt-get update
+ sudo apt-get install -y git xclip
+ # Grunt - an automated task runner
+ sudo npm install -g grunt-cli
+ # Bower - a dependency manager
+ sudo npm install -g bower
+ # Yeoman - for generators
+ sudo npm install -g yo
+ # maven
+ sudo apt-get install maven -y
+ # Gulp - an automated task runner
+ sudo npm install -g gulp-cli
+ # Angular FullStack - My favorite MEAN boilerplate (MEAN = MongoDB, Express, Angularjs, Nodejs)
+ sudo npm install -g generator-angular-fullstack
+ # Vim, Curl, Python - Some random useful stuff
+ sudo apt-get install -y vim curl python-software-properties
+ sudo apt-get install -y python-dev, python-pip
+ sudo apt-get install -y libkrb5-dev
+ # Installing JDK and JRE
+ sudo apt-get install -y default-jre
+ sudo apt-get install -y default-jdk
+ # Archive Extractors
+ sudo apt-get install -y unace unrar zip unzip p7zip-full p7zip-rar sharutils rar uudeview mpack arj cabextract file-roller
+ # FileZilla - a FTP client
+ sudo apt-get install -y filezilla
+```
+
+---
+### Documentation Commands:
+documentation build src/components/DocsMenu.js -f md> ./notes/DocsMenu.md
+documentation build src/components/Footer.js -f md> ./notes/Footer.md
+documentation build src/components/Header.js -f md> ./notes/Header.md
+documentation build src/components/index.js -f md> ./notes/index.md
+documentation build src/components/SectionContent.js -f md> ./notes/SectionContent.md
+documentation build src/components/SectionDocs.js -f md> ./notes/SectionDocs.md
+documentation build src/components/SectionHero.js -f md> ./notes/SectionHero.md
+documentation build src/components/CtaButtons.js -f md> ./notes/CtaButtons.md
+documentation build src/components/DocsSubmenu.js -f md> ./notes/DocsSubmenu.md
+documentation build src/components/FormField.js -f md> ./notes/FormField.md
+documentation build src/components/Icon.js -f md> ./notes/Icon.md
+documentation build src/components/Layout.js -f md> ./notes/Layout.md
+documentation build src/components/SectionCta.js -f md> ./notes/SectionCta.md
+documentation build src/components/SectionGrid.js -f md> ./notes/SectionGrid.md
+documentation build src/components/Submenu.js -f md> ./notes/Submenu.md
+documentation build src/components/ActionLink.js -f md> ./notes/ActionLink.md
+---
+## Blog Content:
+---
+---
+## Bash Cheat Sheet (MY COMMANDS)
+
+
+
+
+ Bash Cheat Sheet (MY COMMANDS)
+
+## 1. Remove spaces from file and folder names and then remove numbers from files and folder names
+### Description: need to : `sudo apt install rename`
+> Notes: Issue when renaming file without numbers collides with existing file name...
+###### code
+```bash
+find . -name "* *" -type d | rename 's/ /_/g'
+find . -name "* *" -type f | rename 's/ /_/g'
+```
+```bash
+```bash
+>>>>>>> master
+find $dir -type f | sed 's|\(.*/\)[^A-Z]*\([A-Z].*\)|mv \"&\" \"\1\2\"|' | sh
+find $dir -type d | sed 's|\(.*/\)[^A-Z]*\([A-Z].*\)|mv \"&\" \"\1\2\"|' | sh
+for i in*.html; do mv "$i" "${i%-*}.html"; done
+for i in*.*; do mv "$i" "${i%-*}.${i##*.}"; done
---
+<<<<<<< HEAD
## Description: combine the contents of every file in the contaning directory.
> Notes: this includes the contents of the file it's self...
## # code:
+=======
+### Description: combine the contents of every file in the contaning directory.
+>Notes: this includes the contents of the file it's self...
+###### code:
+>>>>>>> master
```js
//APPEND-DIR.js
const fs = require('fs');
let cat = require('child_process')
- .execSync('cat *')
+.execSync('cat*')
.toString('UTF-8');
fs.writeFile('output.md', cat, err => {
if (err) throw err;
});
-
```
-
---
+<<<<<<< HEAD
# 2. Download Website Using Wget
@@ -167,11 +692,17 @@ fs.writeFile('output.md', cat, err => {
```sh
+=======
+## 2. Download Website Using Wget
+### Description
+> Notes: ==> sudo apt install wget
+###### code
+```bash
+>>>>>>> master
wget --limit-rate=200k --no-clobber --convert-links --random-wait -r -p -E -e robots=off -U mozilla https://bootcamp42.gitbook.io/python/
-
```
-
---
+<<<<<<< HEAD
# 3. Clean Out Messy Git Repo
@@ -183,15 +714,19 @@ wget --limit-rate=200k --no-clobber --convert-links --random-wait -r -p -E -e ro
```sh
+=======
+## 3. Clean Out Messy Git Repo
+### Description: recursively removes git related folders as well as internal use files / attributions in addition to empty folders
+> Notes: To clear up clutter in repositories that only get used on your local machine.
+###### code
+```bash
+>>>>>>> master
find . -empty -type d -print -delete
-
find . \( -name ".git" -o -name ".gitignore" -o -name ".gitmodules" -o -name ".gitattributes" \) -exec rm -rf -- {} +
-
find . \( -name "*SECURITY.txt" -o -name "*RELEASE.txt" -o -name "*CHANGELOG.txt" -o -name "*LICENSE.txt" -o -name "*CONTRIBUTING.txt" -name "*HISTORY.md" -o -name "*LICENSE" -o -name "*SECURITY.md" -o -name "*RELEASE.md" -o -name "*CHANGELOG.md" -o -name "*LICENSE.md" -o -name "*CODE_OF_CONDUCT.md" -o -name "*CONTRIBUTING.md" \) -exec rm -rf -- {} +
-
```
-
---
+<<<<<<< HEAD
# 4. clone all of a user's git repositories
@@ -205,37 +740,53 @@ find . \( -name "*SECURITY.txt" -o -name "*RELEASE.txt" -o -name "*CHANGELOG.tx
```sh
+=======
+## 4. clone all of a user's git repositories
+### Description: clone all of a user or organization's git repositories
+> Notes:
+###### code
+## Generalized
+```bash
+>>>>>>> master
CNTX={users|orgs}; NAME={username|orgname}; PAGE=1
curl "https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&per_page=100" |
grep -e 'git_url*' |
cut -d \" -f 4 |
xargs -L1 git clone
```
+<<<<<<< HEAD
# Clone all Git User
```sh
+=======
+## Clone all Git User
+```bash
+>>>>>>> master
CNTX={users}; NAME={bgoonz}; PAGE=1
curl "https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&per_page=200"?branch=master |
grep -e 'git_url*' |
cut -d \" -f 4 |
xargs -L1 git clone
-
```
+<<<<<<< HEAD
# Clone all Git Organization
```sh
+=======
+## Clone all Git Organization
+```bash
+>>>>>>> master
CNTX={organizations}; NAME={TheAlgorithms}; PAGE=1
curl "https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&per_page=200"?branch=master |
grep -e 'git_url*' |
cut -d \" -f 4 |
xargs -L1 git clone
-
```
-
---
+<<<<<<< HEAD
# 5. Git Workflow
@@ -244,43 +795,65 @@ curl "https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&per_page=200"?branch=m
## ## code
```sh
+=======
+## 5. Git Workflow
+### Description
+###### code
+```bash
+>>>>>>> master
git pull
git init
git add .
git commit -m"update"
git push -u origin master
```
+<<<<<<< HEAD
```sh
+=======
+```bash
+>>>>>>> master
git init
git add .
git commit -m"update"
git push -u origin main
```
+<<<<<<< HEAD
```sh
+=======
+```bash
+>>>>>>> master
git init
git add .
git commit -m"update"
git push -u origin bryan-guner
```
+<<<<<<< HEAD
```sh
+=======
+```bash
+>>>>>>> master
git init
git add .
git commit -m"update"
git push -u origin gh-pages
```
+<<<<<<< HEAD
```sh
+=======
+```bash
+>>>>>>> master
git init
git add .
git commit -m"update"
git push -u origin preview
```
-
---
+<<<<<<< HEAD
# 6. Recursive Unzip In Place
@@ -292,13 +865,18 @@ git push -u origin preview
```sh
+=======
+## 6. Recursive Unzip In Place
+### Description: recursively unzips folders and then deletes the zip file by the same name
+> Notes:
+###### code
+```bash
+>>>>>>> master
find . -name "*.zip" | while read filename; do unzip -o -d "`dirname "$filename"`" "$filename"; done;
-
find . -name "*.zip" -type f -print -delete
-
```
-
---
+<<<<<<< HEAD
# 7. git pull keeping local changes
@@ -310,13 +888,19 @@ find . -name "*.zip" -type f -print -delete
```sh
+=======
+## 7. git pull keeping local changes
+### Description
+> Notes:
+###### code
+```bash
+>>>>>>> master
git stash
git pull
git stash pop
-
```
-
---
+<<<<<<< HEAD
# 8. Prettier Code Formatter
@@ -328,13 +912,18 @@ git stash pop
```sh
+=======
+## 8. Prettier Code Formatter
+### Description
+> Notes:
+###### code
+```bash
+>>>>>>> master
sudo npm i prettier -g
-
prettier --write .
-
```
-
---
+<<<<<<< HEAD
# 9. Pandoc
@@ -346,15 +935,19 @@ prettier --write .
```sh
+=======
+## 9. Pandoc
+### Description
+> Notes:
+###### code
+```bash
+>>>>>>> master
find ./ -iname "*.md" -type f -exec sh -c 'pandoc --standalone "${0}" -o "${0%.md}.html"' {} \;
-
find ./ -iname "*.html" -type f -exec sh -c 'pandoc --wrap=none --from html --to markdown_strict "${0}" -o "${0%.html}.md"' {} \;
-
find ./ -iname "*.docx" -type f -exec sh -c 'pandoc "${0}" -o "${0%.docx}.md"' {} \;
-
```
-
---
+<<<<<<< HEAD
# 10. Gitpod Installs
@@ -365,6 +958,13 @@ find ./ -iname "*.docx" -type f -exec sh -c 'pandoc "${0}" -o "${0%.docx}.md"' {
## ## code
```sh
+=======
+## 10. Gitpod Installs
+### Description
+> Notes:
+###### code
+```bash
+>>>>>>> master
sudo apt install tree
sudo apt install pandoc -y
sudo apt install rename -y
@@ -373,17 +973,19 @@ sudo apt install wget -y
npm i lebab -g
npm i prettier -g
npm i npm-recursive-install -g
-
```
+<<<<<<< HEAD
```sh
+=======
+```bash
+>>>>>>> master
black .
-
prettier --write .
npm-recursive-install
```
-
---
+<<<<<<< HEAD
# 11. Repo Utils Package
@@ -394,11 +996,17 @@ npm-recursive-install
## ## code
```sh
+=======
+## 11. Repo Utils Package
+### Description: my standard repo utis package
+> Notes:
+###### code
+```bash
+>>>>>>> master
npm i @bgoonz11/repoutils
-
```
-
---
+<<<<<<< HEAD
# 12. Unix Tree Package Usage
@@ -409,9 +1017,16 @@ npm i @bgoonz11/repoutils
## ## code
```sh
+=======
+## 12. Unix Tree Package Usage
+### Description
+> Notes:
+###### code
+```bash
+>>>>>>> master
tree -d -I 'node_modules'
-
tree -I 'node_modules'
+<<<<<<< HEAD
tree -f -I 'node_modules' > TREE.md
@@ -423,9 +1038,16 @@ tree -f -I 'node_modules' -d > TREE.md
tree -f > README.md
+=======
+tree -f -I 'node_modules' >TREE.md
+tree -f -L 2 >README.md
+tree -f -I 'node_modules' >listing-path.md
+tree -f -I 'node_modules' -d >TREE.md
+tree -f >README.md
+>>>>>>> master
```
-
---
+<<<<<<< HEAD
# 13. Find & Replace string in file & folder names recursively
@@ -437,23 +1059,23 @@ tree -f > README.md
```sh
+=======
+## 13. Find & Replace string in file & folder names recursively
+### Description
+> Notes:
+###### code
+```bash
+>>>>>>> master
find . -type f -exec rename 's/string1/string2/g' {} +
-
find . -type d -exec rename 's/-master//g' {} +
-
find . -type f -exec rename 's/\.download//g' {} +
-
find . -type d -exec rename 's/-main//g' {} +
-
-rename 's/\.js\.download$/.js/' *.js\.download
-
+rename 's/\.js\.download$/.js/'*.js\.download
rename 's/\.html\.markdown$/.md/' *.html\.markdown
-
find . -type d -exec rename 's/es6//g' {} +
-
```
-
---
+<<<<<<< HEAD
# 14. Remove double extensions
@@ -467,35 +1089,46 @@ find . -type d -exec rename 's/es6//g' {} +
#!/bin/bash
for file in *.md.md
+=======
+## 14. Remove double extensions
+### Description
+> Notes:
+###### code
+```bash
+# !/bin/bash
+for file in*.md.md
+>>>>>>> master
do
mv "${file}" "${file%.md}"
done
-
-#!/bin/bash
-
+# !/bin/bash
for file in *.html.html
do
mv "${file}" "${file%.html}"
done
```
+<<<<<<< HEAD
```sh
#!/bin/bash
for file in *.html.png
+=======
+```bash
+# !/bin/bash
+for file in*.html.png
+>>>>>>> master
do
mv "${file}" "${file%.png}"
done
-
for file in *.jpg.jpg
do
mv "${file}" "${file%.png}"
done
-
```
-
---
+<<<<<<< HEAD
# 15. Truncate folder names down to 12 characters
@@ -507,11 +1140,17 @@ done
```sh
+=======
+## 15. Truncate folder names down to 12 characters
+### Description: Truncate folder names down to 12 characters
+> Notes: Truncate folder names down to 12 characters
+###### code
+```bash
+>>>>>>> master
for d in ./*; do mv $d ${d:0:12}; done
-
```
-
---
+<<<<<<< HEAD
# 16.Appendir.js
@@ -521,6 +1160,12 @@ for d in ./*; do mv $d ${d:0:12}; done
## ## code
+=======
+## 16.Appendir.js
+### Description: combine the contents of every file in the contaning directory
+> Notes: this includes the contents of the file it's self...
+###### code
+>>>>>>> master
```js
//APPEND-DIR.js
const fs = require('fs');
@@ -529,8 +1174,8 @@ fs.writeFile('output.md', cat, (err) => {
if (err) throw err;
});
```
-
---
+<<<<<<< HEAD
# 17. Replace space in filename with underscore
@@ -541,13 +1186,18 @@ fs.writeFile('output.md', cat, (err) => {
## ## code
```sh
+=======
+## 17. Replace space in filename with underscore
+### Description: followed by replace `'#' with '_'` in directory name
+> Notes: Can be re-purposed to find and replace any set of strings in file or folder names.
+###### code
+```bash
+>>>>>>> master
find . -name "* *" -type f | rename 's/_//g'
-
find . -name "* *" -type d | rename 's/#/_/g'
-
```
-
---
+<<<<<<< HEAD
# 18. Filter & delete files by name and extension
@@ -558,23 +1208,23 @@ find . -name "* *" -type d | rename 's/#/_/g'
## ## code
```sh
+=======
+## 18. Filter & delete files by name and extension
+### Description
+> Notes:
+###### code
+```bash
+>>>>>>> master
find . -name '.bin' -type d -prune -exec rm -rf '{}' +
-
find . -name '*.html' -type d -prune -exec rm -rf '{}' +
-
find . -name 'nav-index' -type d -prune -exec rm -rf '{}' +
-
find . -name 'node-gyp' -type d -prune -exec rm -rf '{}' +
-
find . -name 'deleteme.txt' -type f -prune -exec rm -rf '{}' +
-
find . -name 'right.html' -type f -prune -exec rm -rf '{}' +
-
find . -name 'left.html' -type f -prune -exec rm -rf '{}' +
-
```
-
---
+<<<<<<< HEAD
# 19. Remove lines containing string
@@ -584,45 +1234,58 @@ find . -name 'left.html' -type f -prune -exec rm -rf '{}' +
```sh
+=======
+## 19. Remove lines containing string
+### Description
+> Notes: Remove lines not containing `'.js'`
+```bash
+>>>>>>> master
sudo sed -i '/\.js/!d' ./*scrap2.md
-
```
+<<<<<<< HEAD
## ## code
```sh
+=======
+###### code
+```bash
+>>>>>>> master
sudo sed -i '/githubusercontent/d' ./*sandbox.md
-
sudo sed -i '/githubusercontent/d' ./*scrap2.md
-
sudo sed -i '/github\.com/d' ./*out.md
-
sudo sed -i '/author/d' ./*
-
```
-
---
+<<<<<<< HEAD
# 20. Remove duplicate lines from a text file
## Description
+=======
+## 20. Remove duplicate lines from a text file
+### Description
+>>>>>>> master
> Notes:
> //...syntax of uniq...//
> $uniq [OPTION] [INPUT[OUTPUT]]
> The syntax of this is quite easy to understand. Here, INPUT refers to the input file in which repeated lines need to be filtered out and if INPUT isn't specified then uniq reads from the standard input. OUTPUT refers to the output file in which you can store the filtered output generated by uniq command and as in case of INPUT if OUTPUT isn't specified then uniq writes to the standard output.
-
Now, let's understand the use of this with the help of an example. Suppose you have a text file named kt.txt which contains repeated lines that needs to be omitted. This can simply be done with uniq.
+<<<<<<< HEAD
## ## code
```sh
+=======
+###### code
+```bash
+>>>>>>> master
sudo apt install uniq
uniq -u input.txt output.txt
-
```
-
---
+<<<<<<< HEAD
# 21. Remove lines containing string
@@ -633,34 +1296,34 @@ uniq -u input.txt output.txt
## ## code
```sh
+=======
+## 21. Remove lines containing string
+### Description
+> Notes:
+###### code
+```bash
+>>>>>>> master
sudo sed -i '/githubusercontent/d' ./*sandbox.md
-
sudo sed -i '/githubusercontent/d' ./*scrap2.md
-
sudo sed -i '/github\.com/d' ./*out.md
-
---
title: add_days
tags: date,intermediate
firstSeen: 2020-10-28T16:19:04+02:00
lastUpdated: 2020-10-28T16:19:04+02:00
---
-
sudo sed -i '/title:/d' ./*output.md
sudo sed -i '/firstSeen/d' ./*output.md
sudo sed -i '/lastUpdated/d' ./*output.md
sudo sed -i '/tags:/d' ./*output.md
-
sudo sed -i '/badstring/d' ./*
-
sudo sed -i '/stargazers/d' ./repo.txt
sudo sed -i '/node_modules/d' ./index.html
sudo sed -i '/right\.html/d' ./index.html
sudo sed -i '/right\.html/d' ./right.html
-
```
-
---
+<<<<<<< HEAD
# 22. Zip directory excluding .git and node_modules all the way down (Linux)
@@ -673,10 +1336,18 @@ sudo sed -i '/right\.html/d' ./right.html
```sh
#!/bin/bash
+=======
+## 22. Zip directory excluding .git and node_modules all the way down (Linux)
+### Descriptio: zip up an entire git directory
+> Notes:
+###### code
+```bash
+# !/bin/bash
+>>>>>>> master
TSTAMP=`date '+%Y%m%d-%H%M%S'`
zip -r $1.$TSTAMP.zip $1 -x "**.git/*" -x "**node_modules/*" `shift; echo $@;`
-
printf "\nCreated: $1.$TSTAMP.zip\n"
+<<<<<<< HEAD
# usage:
# - zipdir thedir
@@ -685,9 +1356,16 @@ printf "\nCreated: $1.$TSTAMP.zip\n"
# if in windows/git-bash, add 'zip' command this way:
# https://stackoverflow.com/a/55749636/1482990
+=======
+## usage:
+## - zipdir thedir
+## - zip thedir -x "anotherexcludedsubdir" (important the double quotes to prevent glob expansion)
+## if in windows/git-bash, add 'zip' command this way:
+## https://stackoverflow.com/a/55749636/1482990
+>>>>>>> master
```
-
---
+<<<<<<< HEAD
# 23. Delete files containing a certain string
@@ -699,12 +1377,19 @@ printf "\nCreated: $1.$TSTAMP.zip\n"
```sh
find . | xargs grep -l www.redhat.com | awk '{print "rm "$1}' > doit.sh
+=======
+## 23. Delete files containing a certain string
+### Description
+> Notes:
+###### code
+```bash
+find . | xargs grep -l www.redhat.com | awk '{print "rm "$1}' > doit.sh
+>>>>>>> master
vi doit.sh // check for murphy and his law
source doit.sh
-
```
-
---
+<<<<<<< HEAD
# 24
@@ -937,21 +1622,187 @@ cmd $listing --sort=extension > > $html
```sh
+=======
+## 24 Generate sitemap
+### Description
+> Notes: bash command to auto generate sitemap.html which will list all files contained within parent directory.
+###### code
+```bash
+# !/bin/sh
+## find ./ | grep -i "\.*$" >files
+find ./ | sed -E -e 's/([^ ]+[ ]+){8}//' | grep -i "\.*$">files
+listing="files"
+out=""
+html="sitemap.html"
+out="basename $out.html"
+html="sitemap.html"
+cmd() {
+ echo ' '
+ echo ''
+ echo ''
+ echo ' '
+ echo ' '
+ echo ''
+ echo ' '
+ echo ' '
+ echo " directory "
+ echo ''
+ echo ''
+ echo ""
+ echo ''
+ echo ''
+ echo ''
+ echo ""
+ # continue with the HTML stuff
+ echo ""
+ echo ""
+ echo "
"
+ echo ""
+ echo ""
+}
+cmd $listing --sort=extension >>$html
+```
+---
+## 26. Filter Corrupted Git Repo For Troublesome File
+### Description
+> Notes:
+###### code
+```bash
+>>>>>>> master
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch assets/_index.html' HEAD
-
```
-
---
+<<<<<<< HEAD
# 27. OVERWRITE LOCAL CHANGES
## Description
+=======
+## 27. OVERWRITE LOCAL CHANGES
+### Description
+>>>>>>> master
Important: If you have any local changes, they will be lost. With or without --hard option, any local commits that haven't been pushed will be lost.[*]
If you have any files that are not tracked by Git (e.g. uploaded user content), these files will not be affected.
-
> Notes:
> First, run a fetch to update all origin/ refs to latest:
+<<<<<<< HEAD
## ## code
@@ -971,19 +1822,35 @@ git reset --hard origin/
# git fetch downloads the latest from remote without trying to merge or rebase anything.
# Then the git reset resets the master branch to what you just fetched. The --hard option changes all the files in your working tree to match the files in origin/master
+=======
+###### code
+```bash
+git fetch --all
+## Backup your current branch:
+git branch backup-master
+## Then, you have two options:
+git reset --hard origin/master
+## OR If you are on some other branch:
+git reset --hard origin/
+## Explanation:
+## git fetch downloads the latest from remote without trying to merge or rebase anything.
+## Then the git reset resets the master branch to what you just fetched. The --hard option changes all the files in your working tree to match the files in origin/master
+>>>>>>> master
git fetch --all
git reset --hard origin/master
-
```
-
---
+<<<<<<< HEAD
# 28. Remove Submodules
## Description: To remove a submodule you need to
+=======
+## 28. Remove Submodules
+### Description: To remove a submodule you need to
+>>>>>>> master
> Notes:
-
> Delete the relevant section from the .gitmodules file.
> Stage the .gitmodules changes git add .gitmodules
> Delete the relevant section from .git/config.
@@ -991,14 +1858,19 @@ git reset --hard origin/master
> Run rm -rf .git/modules/path_to_submodule (no trailing slash).
> Commit git commit -m "Removed submodule "
> Delete the now untracked submodule files rm -rf path_to_submodule
+<<<<<<< HEAD
## ## code
```sh
+=======
+###### code
+```bash
+>>>>>>> master
git submodule deinit
```
-
---
+<<<<<<< HEAD
# 29. GET GISTS
@@ -1009,19 +1881,21 @@ git submodule deinit
## ## code
```sh
+=======
+## 29. GET GISTS
+### Description
+> Notes:
+###### code
+```bash
+>>>>>>> master
sudo apt install wget
-
wget -q -O - https://api.github.com/users/bgoonz/gists | grep raw_url | awk -F\" '{print $4}' | xargs -n3 wget
-
wget -q -O - https://api.github.com/users/amitness/gists | grep raw_url | awk -F\" '{print $4}' | xargs -n3 wget
-
wget -q -O - https://api.github.com/users/drodsou/gists | grep raw_url | awk -F\" '{print $4}' | xargs -n1 wget
-
wget -q -O - https://api.github.com/users/thomasmb/gists | grep raw_url | awk -F\" '{print $4}' | xargs -n1 wget
-
```
-
---
+<<<<<<< HEAD
# 30. Remove Remote OriginL
@@ -1033,11 +1907,17 @@ wget -q -O - https://api.github.com/users/thomasmb/gists | grep raw_url | awk -F
```sh
+=======
+## 30. Remove Remote OriginL
+### Description
+> Notes:
+###### code
+```bash
+>>>>>>> master
git remote remove origin
-
```
-
---
+<<<<<<< HEAD
# 31. just clone .git folder
@@ -1049,11 +1929,17 @@ git remote remove origin
```sh
+=======
+## 31. just clone .git folder
+### Description
+> Notes:
+###### code
+```bash
+>>>>>>> master
git clone --bare --branch=master --single-branch https://github.com/bgoonz/My-Web-Dev-Archive.git
-
```
-
---
+<<<<<<< HEAD
# 32. Undo recent pull request
@@ -1065,11 +1951,17 @@ git clone --bare --branch=master --single-branch https://github.com/bgoonz/My-We
```sh
+=======
+## 32. Undo recent pull request
+### Description
+> Notes:
+###### code
+```bash
+>>>>>>> master
git reset --hard master@{"10 minutes ago"}
-
```
-
---
+<<<<<<< HEAD
# 33. Lebab
@@ -1082,6 +1974,14 @@ git reset --hard master@{"10 minutes ago"}
```sh
# Safe:
+=======
+## 33. Lebab
+### Description: ES5 --> ES6
+> Notes:
+###### code
+```bash
+## Safe:
+>>>>>>> master
lebab --replace ./ --transform arrow
lebab --replace ./ --transform arrow-return
lebab --replace ./ --transform for-of
@@ -1091,9 +1991,13 @@ git reset --hard master@{"10 minutes ago"}
lebab --replace ./ --transform obj-method
lebab --replace ./ --transform obj-shorthand
lebab --replace ./ --transform multi-var
+<<<<<<< HEAD
# ALL:
+=======
+## ALL:
+>>>>>>> master
lebab --replace ./ --transform obj-method
lebab --replace ./ --transform class
lebab --replace ./ --transform arrow
@@ -1123,10 +2027,9 @@ lebab --replace ./ --transform template
lebab --replace ./ --transform default-param
lebab --replace ./ --transform destruct-param
lebab --replace ./ --transform includes
-
```
-
---
+<<<<<<< HEAD
# 34. Troubleshoot Ubuntu Input/Output Error
@@ -1136,15 +2039,18 @@ lebab --replace ./ --transform includes
## ## code
+=======
+## 34. Troubleshoot Ubuntu Input/Output Error
+### Description: Open Powershell as Administrator
+> Notes:
+###### code
+>>>>>>> master
```ps1
-
wsl.exe --shutdown
-
Get-Service LxssManager | Restart-Service
-
```
-
---
+<<<<<<< HEAD
# 35. Export Medium as Markdown
@@ -1159,9 +2065,18 @@ npm i mediumexporter -g
mediumexporter https://medium.com/codex/fundamental-data-structures-in-javascript-8f9f709c15b4 > ds.md
+=======
+## 35. Export Medium as Markdown
+### Description
+> Notes:
+###### code
+```bash
+npm i mediumexporter -g
+mediumexporter https://medium.com/codex/fundamental-data-structures-in-javascript-8f9f709c15b4 >ds.md
+>>>>>>> master
```
-
---
+<<<<<<< HEAD
# 36. Delete files in violation of a given size range (100MB for git)
@@ -1173,13 +2088,18 @@ mediumexporter https://medium.com/codex/fundamental-data-structures-in-javascrip
```sh
+=======
+## 36. Delete files in violation of a given size range (100MB for git)
+### Description
+> Notes:
+###### code
+```bash
+>>>>>>> master
find . -size +75M -a -print -a -exec rm -f {} \;
-
find . -size +98M -a -print -a -exec rm -f {} \;
-
```
-
---
+<<<<<<< HEAD
# 37. download all links of given file type
@@ -1191,11 +2111,17 @@ find . -size +98M -a -print -a -exec rm -f {} \;
```sh
+=======
+## 37. download all links of given file type
+### Description
+> Notes:
+###### code
+```bash
+>>>>>>> master
wget -r -A.pdf https://overapi.com/git
-
```
-
---
+<<<<<<< HEAD
# 38. Kill all node processes
@@ -1206,11 +2132,17 @@ wget -r -A.pdf https://overapi.com/git
## ## code
```sh
+=======
+## 38. Kill all node processes
+### Description
+> Notes:
+###### code
+```bash
+>>>>>>> master
killall -s KILL node
-
```
-
---
+<<<<<<< HEAD
# 39. Remove string from file names recursively
@@ -1221,20 +2153,31 @@ killall -s KILL node
```sh
find -type f -exec sed -i 's/ / /g' {} +
+=======
+## 39. Remove string from file names recursively
+### Description: In the example below I am using this command to remove the string "-master" from all file names in the working directory and all of it's sub directories
+###### code
+```bash
+find -type f -exec sed -i 's///g' {} +
+>>>>>>> master
find . -type f -exec rename 's/-master//g' {} +
-
```
+<<<<<<< HEAD
> Notes: The same could be done for folder names by changing the _-type f_ flag (for file) to a _-type d_ flag (for directory)
```sh
find -type d -exec sed -i 's/ / /g' {} +
+=======
+> Notes: The same could be done for folder names by changing the*-type f*flag (for file) to a*-type d*flag (for directory)
+```bash
+find -type d -exec sed -i 's///g' {} +
+>>>>>>> master
find . -type d -exec rename 's/-master//g' {} +
-
```
-
---
+<<<<<<< HEAD
# 40. Remove spaces from file and folder names recursively
@@ -1246,11 +2189,18 @@ find . -type d -exec rename 's/-master//g' {} +
```sh
+=======
+## 40. Remove spaces from file and folder names recursively
+### Description: replaces spaces in file and folder names with an `_` underscore
+> Notes: need to run `sudo apt install rename` to use this command
+###### code
+```bash
+>>>>>>> master
find . -name "* *" -type d | rename 's/ /_/g'
find . -name "* *" -type f | rename 's/ /_/g'
```
-
---
+<<<<<<< HEAD
# 41. Zip Each subdirectories in a given directory into their own zip file
@@ -1263,9 +2213,17 @@ find . -name "* *" -type f | rename 's/ /_/g'
```sh
for i in */; do zip -r "${i%/}.zip" "$i"; done
+=======
+## 41. Zip Each subdirectories in a given directory into their own zip file
+### Description
+> Notes:
+###### code
+```bash
+for i in*/; do zip -r "${i%/}.zip" "$i"; done
+>>>>>>> master
```
-
---
+<<<<<<< HEAD
# 90
@@ -1277,30 +2235,35 @@ for i in */; do zip -r "${i%/}.zip" "$i"; done
## ## code
+=======
+## 91. Unzip PowerShell
+### Description
+> Notes:
+###### code
+>>>>>>> master
```ps1
-
PARAM (
[string] $ZipFilesPath = "./",
[string] $UnzipPath = "./RESULT"
)
-
$Shell = New-Object -com Shell.Application
$Location = $Shell.NameSpace($UnzipPath)
-
$ZipFiles = Get-Childitem $ZipFilesPath -Recurse -Include *.ZIP
-
$progress = 1
foreach ($ZipFile in $ZipFiles) {
- Write-Progress -Activity "Unzipping to $($UnzipPath)" -PercentComplete (($progress / ($ZipFiles.Count + 1)) * 100) -CurrentOperation $ZipFile.FullName -Status "File $($Progress) of $($ZipFiles.Count)"
+Write-Progress -Activity "Unzipping to $($UnzipPath)" -PercentComplete (($progress / ($ZipFiles.Count + 1))* 100) -CurrentOperation $ZipFile.FullName -Status "File $($Progress) of $($ZipFiles.Count)"
$ZipFolder = $Shell.NameSpace($ZipFile.fullname)
+<<<<<<< HEAD
$Location.Copyhere($ZipFolder.items(), 1040) # 1040 - No msgboxes to the user - http://msdn.microsoft.com/en-us/library/bb787866%28VS.85%29.aspx
+=======
+ $Location.Copyhere($ZipFolder.items(), 1040) # 1040 - No msgboxes to the user - https://msdn.microsoft.com/library/bb787866%28VS.85%29.aspx
+>>>>>>> master
$progress++
}
-
```
-
---
+<<<<<<< HEAD
# 92. return to bash from zsh
@@ -1311,11 +2274,17 @@ foreach ($ZipFile in $ZipFiles) {
## ## code
```sh
+=======
+## 92. return to bash from zsh
+### Description
+> Notes:
+###### code
+```bash
+>>>>>>> master
sudo apt --purge remove zsh
-
```
-
---
+<<<<<<< HEAD
# 93. Symbolic Link
@@ -1327,13 +2296,18 @@ foreach ($ZipFile in $ZipFiles) {
```sh
+=======
+## 93. Symbolic Link
+### Description: to working directory
+> Notes:
+###### code
+```bash
+>>>>>>> master
ln -s "$(pwd)" ~/NameOfLink
-
ln -s "$(pwd)" ~/Downloads
-
```
-
---
+<<<<<<< HEAD
# 94. auto generate readme
@@ -1345,11 +2319,17 @@ ln -s "$(pwd)" ~/Downloads
```sh
+=======
+## 94. auto generate readme
+### Description: rename existing readme to blueprint.md
+> Notes:
+###### code
+```bash
+>>>>>>> master
npx @appnest/readme generate
-
```
-
---
+<<<<<<< HEAD
# 95. Log into postgres
@@ -1360,13 +2340,23 @@ npx @appnest/readme generate
## ## code
```sh
+=======
+## 95. Log into postgres
+### Description
+> Notes:
+###### code
+```bash
+>>>>>>> master
sudo -u postgres psql
```
-
---
+<<<<<<< HEAD
## Technologies Used
+=======
+## 96. URL To Subscribe To YouTube Channel
+>>>>>>> master
| URL | |
|----------------------|----------------------------------------------------------|
| Miscellaneous | webpack ; Prism |
@@ -1381,6 +2371,7 @@ sudo -u postgres psql
| Tag managers | Google Tag Manager |
| Live chat | Smartsupp ; LiveChat : Mesibo API |
| JavaScript libraries | Lodash ; Dojo ; core-js ; jQuery |
+<<<<<<< HEAD
@@ -1388,37 +2379,41 @@ sudo -u postgres psql
# 96. URL To Subscribe To YouTube Channel
+=======
+---
+## 96. URL To Subscribe To YouTube Channel
+>>>>>>> master
## Description
-
> Notes:
+<<<<<<< HEAD
## ## code
+=======
+###### code
+>>>>>>> master
```txt
-
https://www.youtube.com/channel/UC1HDa0wWnIKUf-b4yY9JecQ?sub_confirmation=1
-
```
-
---
+<<<<<<< HEAD
# 97. Embed Repl.it In Medium Post
## ## code
+=======
+## 97. Embed Repl.it In Medium Post
+###### code
+>>>>>>> master
```txt
-
https://repl.it/@bgoonz/Data-Structures-Algos-Codebase?lite=true&referrer=https%3A%2F%2Fbryanguner.medium.com
-
https://repl.it/@bgoonz/node-db1-project?lite=true&referrer=https%3A%2F%2Fbryanguner.medium.com
-
https://repl.it/@bgoonz/interview-prac?lite=true&referrer=https%3A%2F%2Fbryanguner.medium.com
-
https://repl.it/@bgoonz/Database-Prac?lite=true&referrer=https%3A%2F%2Fbryanguner.medium.com
-
```
-
---
+<<<<<<< HEAD
# 98
@@ -1430,19 +2425,474 @@ https://repl.it/@bgoonz/Database-Prac?lite=true&referrer=https%3A%2F%2Fbryan
```sh
+=======
+## 98 rRmove text target="parent" from files called right.html
+### Description
+> Notes:
+###### code
+```bash
+>>>>>>> master
find . -name *right.html -type f -exec sed -i 's/target="_parent"//g' {} +
-
-find . -name *right.html -type f -exec sed -i 's/target="_parent"//g' {} +
-
+find . -name*right.html -type f -exec sed -i 's/target="_parent"//g' {} +
```
+<<<<<<< HEAD
+=======
+## 99. Cheat Sheet
+### Description
+> Notes:
+###### code
+```bash
+# !/bin/bash
+revert
+## SHORTCUTS and HISTORY
+CTRL+A # move to beginning of line
+CTRL+B # moves backward one character
+CTRL+C # halts the current command
+CTRL+D # deletes one character backward or logs out of current session, similar to exit
+CTRL+E # moves to end of line
+CTRL+F # moves forward one character
+CTRL+G # aborts the current editing command and ring the terminal bell
+CTRL+H # deletes one character under cursor (same as DELETE)
+CTRL+J # same as RETURN
+CTRL+K # deletes (kill) forward to end of line
+CTRL+L # clears screen and redisplay the line
+CTRL+M # same as RETURN
+CTRL+N # next line in command history
+CTRL+O # same as RETURN, then displays next line in history file
+CTRL+P # previous line in command history
+CTRL+Q # resumes suspended shell output
+CTRL+R # searches backward
+CTRL+S # searches forward or suspends shell output
+CTRL+T # transposes two characters
+CTRL+U # kills backward from point to the beginning of line
+CTRL+V # makes the next character typed verbatim
+CTRL+W # kills the word behind the cursor
+CTRL+X # lists the possible filename completions of the current word
+CTRL+Y # retrieves (yank) last item killed
+CTRL+Z # stops the current command, resume with fg in the foreground or bg in the background
+ALT+B # moves backward one word
+ALT+D # deletes next word
+ALT+F # moves forward one word
+ALT+H # deletes one character backward
+ALT+T # transposes two words
+ALT+. # pastes last word from the last command. Pressing it repeatedly traverses through command history.
+ALT+U # capitalizes every character from the current cursor position to the end of the word
+ALT+L # uncapitalizes every character from the current cursor position to the end of the word
+ALT+C # capitalizes the letter under the cursor. The cursor then moves to the end of the word.
+ALT+R # reverts any changes to a command you've pulled from your history if you've edited it.
+ALT+? # list possible completions to what is typed
+ALT+^ # expand line to most recent match from history
+CTRL+X then ( # start recording a keyboard macro
+CTRL+X then ) # finish recording keyboard macro
+CTRL+X then E # recall last recorded keyboard macro
+CTRL+X then CTRL+E # invoke text editor (specified by $EDITOR) on current command line then execute resultes as shell commands
+BACKSPACE # deletes one character backward
+DELETE # deletes one character under cursor
+history # shows command line history
+!! # repeats the last command
+! # refers to command line 'n'
+! # refers to command starting with 'string'
+exit # logs out of current session
+## BASH BASICS
+env # displays all environment variables
+echo $SHELL # displays the shell you're using
+echo $BASH_VERSION # displays bash version
+bash # if you want to use bash (type exit to go back to your previously opened shell)
+whereis bash # locates the binary, source and manual-page for a command
+which bash # finds out which program is executed as 'bash' (default: /bin/bash, can change across environments)
+clear # clears content on window (hide displayed lines)
+## FILE COMMANDS
+ls # lists your files in current directory, ls to print files in a specific directory
+ls -l # lists your files in 'long format', which contains the exact size of the file, who owns the file and who has the right to look at it, and when it was last modified
+ls -a # lists all files in 'long format', including hidden files (name beginning with '.')
+ln -s # creates symbolic link to file
+readlink # shows where a symbolic links points to
+tree # show directories and subdirectories in easilly readable file tree
+mc # terminal file explorer (alternative to ncdu)
+touch # creates or updates (edit) your file
+mktemp -t # make a temp file in /tmp/ which is deleted at next boot (-d to make directory)
+cat # prints file raw content (will not be interpreted)
+any_command > # '>' is used to perform redirections, it will set any_command's stdout to file instead of "real stdout" (generally /dev/stdout)
+more # shows the first part of a file (move with space and type q to quit)
+head # outputs the first lines of file (default: 10 lines)
+tail # outputs the last lines of file (useful with -f option) (default: 10 lines)
+vim # opens a file in VIM (VI iMproved) text editor, will create it if it doesn't exist
+mv # moves a file to destination, behavior will change based on 'dest' type (dir: file is placed into dir; file: file will replace dest (tip: useful for renaming))
+cp # copies a file
+rm # removes a file
+find . -name # searches for a file or a directory in the current directory and all its sub-directories by its name
+diff # compares files, and shows where they differ
+wc # tells you how many lines, words and characters there are in a file. Use -lwc (lines, word, character) to ouput only 1 of those informations
+sort # sorts the contents of a text file line by line in alphabetical order, use -n for numeric sort and -r for reversing order.
+sort -t -k # sorts the contents on specific sort key field starting from 1, using the field separator t.
+rev # reverse string characters (hello becomes olleh)
+chmod -options # lets you change the read, write, and execute permissions on your files (more infos: SUID, GUID)
+gzip # compresses files using gzip algorithm
+gunzip # uncompresses files compressed by gzip
+gzcat # lets you look at gzipped file without actually having to gunzip it
+lpr # prints the file
+lpq # checks out the printer queue
+lprm # removes something from the printer queue
+genscript # converts plain text files into postscript for printing and gives you some options for formatting
+dvips # prints .dvi files (i.e. files produced by LaTeX)
+grep # looks for the string in the files
+grep -r # search recursively for pattern in directory
+head -n file_name | tail +n # Print nth line from file.
+head -y lines.txt | tail +x # want to display all the lines from x to y. This includes the xth and yth lines.
+## DIRECTORY COMMANDS
+mkdir # makes a new directory
+rmdir # remove an empty directory
+rmdir -rf # remove a non-empty directory
+mv # rename a directory from to
+cd # changes to home
+cd .. # changes to the parent directory
+cd # changes directory
+cp -r # copy into including sub-directories
+pwd # tells you where you currently are
+cd ~ # changes to home.
+cd - # changes to previous working directory
+## SSH, SYSTEM INFO & NETWORK COMMANDS
+ssh user@host # connects to host as user
+ssh -p user@host # connects to host on specified port as user
+ssh-copy-id user@host # adds your ssh key to host for user to enable a keyed or passwordless login
+whoami # returns your username
+passwd # lets you change your password
+quota -v # shows what your disk quota is
+date # shows the current date and time
+cal # shows the month's calendar
+uptime # shows current uptime
+w # displays whois online
+finger # displays information about user
+uname -a # shows kernel information
+man # shows the manual for specified command
+df # shows disk usage
+du # shows the disk usage of the files and directories in filename (du -s give only a total)
+last # lists your last logins
+ps -u yourusername # lists your processes
+kill # kills the processes with the ID you gave
+killall # kill all processes with the name
+top # displays your currently active processes
+lsof # lists open files
+bg # lists stopped or background jobs ; resume a stopped job in the background
+fg # brings the most recent job in the foreground
+fg # brings job to the foreground
+ping # pings host and outputs results
+whois # gets whois information for domain
+dig # gets DNS information for domain
+dig -x # reverses lookup host
+wget # downloads file
+time # report time consumed by command execution
+## VARIABLES
+varname=value # defines a variable
+varname=value command # defines a variable to be in the environment of a particular subprocess
+echo $varname # checks a variable's value
+echo $$ # prints process ID of the current shell
+echo $! # prints process ID of the most recently invoked background job
+echo $? # displays the exit status of the last command
+read # reads a string from the input and assigns it to a variable
+read -p "prompt" # same as above but outputs a prompt to ask user for value
+column -t # display info in pretty columns (often used with pipe)
+let = # performs mathematical calculation using operators like +, -, *, /, %
+export VARNAME=value # defines an environment variable (will be available in subprocesses)
+array[0]=valA # how to define an array
+array[1]=valB
+array[2]=valC
+array=([2]=valC [0]=valA [1]=valB) # another way
+array=(valA valB valC) # and another
+${array[i]} # displays array's value for this index. If no index is supplied, array element 0 is assumed
+${#array[i]} # to find out the length of any element in the array
+${#array[@]} # to find out how many values there are in the array
+declare -a # the variables are treated as arrays
+declare -f # uses function names only
+declare -F # displays function names without definitions
+declare -i # the variables are treated as integers
+declare -r # makes the variables read-only
+declare -x # marks the variables for export via the environment
+${varname:-word} # if varname exists and isn't null, return its value; otherwise return word
+${varname:word} # if varname exists and isn't null, return its value; otherwise return word
+${varname:=word} # if varname exists and isn't null, return its value; otherwise set it word and then return its value
+${varname:?message} # if varname exists and isn't null, return its value; otherwise print varname, followed by message and abort the current command or script
+${varname:+word} # if varname exists and isn't null, return word; otherwise return null
+${varname:offset:length} # performs substring expansion. It returns the substring of $varname starting at offset and up to length characters
+${variable#pattern} # if the pattern matches the beginning of the variable's value, delete the shortest part that matches and return the rest
+${variable##pattern} # if the pattern matches the beginning of the variable's value, delete the longest part that matches and return the rest
+${variable%pattern} # if the pattern matches the end of the variable's value, delete the shortest part that matches and return the rest
+${variable%%pattern} # if the pattern matches the end of the variable's value, delete the longest part that matches and return the rest
+${variable/pattern/string} # the longest match to pattern in variable is replaced by string. Only the first match is replaced
+${variable//pattern/string} # the longest match to pattern in variable is replaced by string. All matches are replaced
+${#varname} # returns the length of the value of the variable as a character string
+*(patternlist) # matches zero or more occurrences of the given patterns
++(patternlist) # matches one or more occurrences of the given patterns
+?(patternlist) # matches zero or one occurrence of the given patterns
+@(patternlist) # matches exactly one of the given patterns
+!(patternlist) # matches anything except one of the given patterns
+$(UNIX command) # command substitution: runs the command and returns standard output
+## FUNCTIONS
+## The function refers to passed arguments by position (as if they were positional parameters), that is, $1, $2, and so forth.
+## $@ is equal to "$1" "$2"... "$N", where N is the number of positional parameters. $# holds the number of positional parameters.
+function functname() {
+ shell commands
+}
+unset -f functname # deletes a function definition
+declare -f # displays all defined functions in your login session
+## FLOW CONTROLS
+statement1 && statement2 # and operator
+statement1 || statement2 # or operator
+-a # and operator inside a test conditional expression
+-o # or operator inside a test conditional expression
+## STRINGS
+str1 == str2 # str1 matches str2
+str1 != str2 # str1 does not match str2
+str1 < str2 # str1 is less than str2 (alphabetically)
+str1 > str2 # str1 is greater than str2 (alphabetically)
+str1 \> str2 # str1 is sorted after str2
+str1 \< str2 # str1 is sorted before str2
+-n str1 # str1 is not null (has length greater than 0)
+-z str1 # str1 is null (has length 0)
+## FILES
+-a file # file exists or its compilation is successful
+-d file # file exists and is a directory
+-e file # file exists; same -a
+-f file # file exists and is a regular file (i.e., not a directory or other special type of file)
+-r file # you have read permission
+-s file # file exists and is not empty
+-w file # your have write permission
+-x file # you have execute permission on file, or directory search permission if it is a directory
+-N file # file was modified since it was last read
+-O file # you own file
+-G file # file's group ID matches yours (or one of yours, if you are in multiple groups)
+file1 -nt file2 # file1 is newer than file2
+file1 -ot file2 # file1 is older than file2
+## NUMBERS
+-lt # less than
+-le # less than or equal
+-eq # equal
+-ge # greater than or equal
+-gt # greater than
+-ne # not equal
+if condition
+then
+ statements
+[elif condition
+ then statements...]
+[else
+ statements]
+fi
+for x in {1..10}
+do
+ statements
+done
+for name [in list]
+do
+ statements that can use $name
+done
+for (( initialisation ; ending condition ; update ))
+do
+ statements...
+done
+case expression in
+ pattern1 )
+ statements ;;
+ pattern2 )
+ statements ;;
+esac
+select name [in list]
+do
+ statements that can use $name
+done
+while condition; do
+ statements
+done
+until condition; do
+ statements
+done
+## COMMAND-LINE PROCESSING CYCLE
+## The default order for command lookup is functions, followed by built-ins, with scripts and executables last.
+## There are three built-ins that you can use to override this order: `command`, `builtin` and `enable`.
+command # removes alias and function lookup. Only built-ins and commands found in the search path are executed
+builtin # looks up only built-in commands, ignoring functions and commands found in PATH
+enable # enables and disables shell built-ins
+eval # takes arguments and run them through the command-line processing steps all over again
+## INPUT/OUTPUT REDIRECTORS
+cmd1|cmd2 # pipe; takes standard output of cmd1 as standard input to cmd2
+< file # takes standard input from file
+> file # directs standard output to file
+>> file # directs standard output to file; append to file if it already exists
+>|file # forces standard output to file even if noclobber is set
+n>|file # forces output to file from file descriptor n even if noclobber is set
+<> file # uses file as both standard input and standard output
+n<>file # uses file as both input and output for file descriptor n
+n>file # directs file descriptor n to file
+n>file # directs file description n to file; append to file if it already exists
+n>& # duplicates standard output to file descriptor n
+n<& # duplicates standard input from file descriptor n
+n>&m # file descriptor n is made to be a copy of the output file descriptor
+n<&m # file descriptor n is made to be a copy of the input file descriptor
+&>file # directs standard output and standard error to file
+<&- # closes the standard input
+>&- # closes the standard output
+n>&- # closes the ouput from file descriptor n
+n<&- # closes the input from file descripor n
+|tee # output command to both terminal and a file (-a to append to file)
+## PROCESS HANDLING
+## To suspend a job, type CTRL+Z while it is running. You can also suspend a job with CTRL+Y.
+## This is slightly different from CTRL+Z in that the process is only stopped when it attempts to read input from terminal.
+## Of course, to interrupt a job, type CTRL+C.
+myCommand & # runs job in the background and prompts back the shell
+jobs # lists all jobs (use with -l to see associated PID)
+fg # brings a background job into the foreground
+fg %+ # brings most recently invoked background job
+fg %- # brings second most recently invoked background job
+fg %N # brings job number N
+fg %string # brings job whose command begins with string
+fg %?string # brings job whose command contains string
+kill -l # returns a list of all signals on the system, by name and number
+kill PID # terminates process with specified PID
+kill -s SIGKILL 4500 # sends a signal to force or terminate the process
+kill -15 913 # Ending PID 913 process with signal 15 (TERM)
+kill %1 # Where %1 is the number of job as read from 'jobs' command.
+ps # prints a line of information about the current running login shell and any processes running under it
+ps -a # selects all processes with a tty except session leaders
+trap cmd sig1 sig2 # executes a command when a signal is received by the script
+trap "" sig1 sig2 # ignores that signals
+trap - sig1 sig2 # resets the action taken when the signal is received to the default
+disown # removes the process from the list of jobs
+wait # waits until all background jobs have finished
+sleep # wait # of seconds before continuing
+pv # display progress bar for data handling commands. often used with pipe like |pv
+yes # give yes response everytime an input is requested from script/process
+## TIPS & TRICKS
+## set an alias
+cd; nano .bash_profile
+> alias gentlenode='ssh admin@gentlenode.com -p 3404' # add your alias in .bash_profile
+## to quickly go to a specific directory
+cd; nano .bashrc
+> shopt -s cdable_vars
+> export websites="/Users/mac/Documents/websites"
+source .bashrc
+cd $websites
+## DEBUGGING SHELL PROGRAMS
+bash -n scriptname # don't run commands; check for syntax errors only
+set -o noexec # alternative (set option in script)
+bash -v scriptname # echo commands before running them
+set -o verbose # alternative (set option in script)
+bash -x scriptname # echo commands after command-line processing
+set -o xtrace # alternative (set option in script)
+trap 'echo $varname' EXIT # useful when you want to print out the values of variables at the point that your script exits
+function errtrap {
+ es=$?
+ echo "ERROR line $1: Command exited with status $es."
+}
+trap 'errtrap $LINENO' ERR # is run whenever a command in the surrounding script or function exits with non-zero status
+function dbgtrap {
+ echo "badvar is $badvar"
+}
+trap dbgtrap DEBUG # causes the trap code to be executed before every statement in a function or script
+## ...section of code in which the problem occurs...
+trap - DEBUG # turn off the DEBUG trap
+function returntrap {
+ echo "A return occurred"
+}
+trap returntrap RETURN # is executed each time a shell function or a script executed with the . or source commands finishes executing
+## COLORS AND BACKGROUNDS
+## note: \e or \x1B also work instead of \033
+## Reset
+Color_Off='\033[0m' # Text Reset
+## Regular Colors
+Black='\033[0;30m' # Black
+Red='\033[0;31m' # Red
+Green='\033[0;32m' # Green
+Yellow='\033[0;33m' # Yellow
+Blue='\033[0;34m' # Blue
+Purple='\033[0;35m' # Purple
+Cyan='\033[0;36m' # Cyan
+White='\033[0;97m' # White
+## Additional colors
+LGrey='\033[0;37m' # Ligth Gray
+DGrey='\033[0;90m' # Dark Gray
+LRed='\033[0;91m' # Ligth Red
+LGreen='\033[0;92m' # Ligth Green
+LYellow='\033[0;93m'# Ligth Yellow
+LBlue='\033[0;94m' # Ligth Blue
+LPurple='\033[0;95m'# Light Purple
+LCyan='\033[0;96m' # Ligth Cyan
+## Bold
+BBlack='\033[1;30m' # Black
+BRed='\033[1;31m' # Red
+BGreen='\033[1;32m' # Green
+BYellow='\033[1;33m'# Yellow
+BBlue='\033[1;34m' # Blue
+BPurple='\033[1;35m'# Purple
+BCyan='\033[1;36m' # Cyan
+BWhite='\033[1;37m' # White
+## Underline
+UBlack='\033[4;30m' # Black
+URed='\033[4;31m' # Red
+UGreen='\033[4;32m' # Green
+UYellow='\033[4;33m'# Yellow
+UBlue='\033[4;34m' # Blue
+UPurple='\033[4;35m'# Purple
+UCyan='\033[4;36m' # Cyan
+UWhite='\033[4;37m' # White
+## Background
+On_Black='\033[40m' # Black
+On_Red='\033[41m' # Red
+On_Green='\033[42m' # Green
+On_Yellow='\033[43m'# Yellow
+On_Blue='\033[44m' # Blue
+On_Purple='\033[45m'# Purple
+On_Cyan='\033[46m' # Cyan
+On_White='\033[47m' # White
+## Example of usage
+echo -e "${Green}This is GREEN text${Color_Off} and normal text"
+echo -e "${Red}${On_White}This is Red test on White background${Color_Off}"
+## option -e is mandatory, it enable interpretation of backslash escapes
+printf "${Red} This is red \n"
+```
+
+>
+#### Find
+## To find files by case-insensitive extension (ex: .jpg, .JPG, .jpG)
+find . -iname "\*.jpg"
+## To find directories
+find . -type d
+## To find files
+find . -type f
+## To find files by octal permission
+find . -type f -perm 777
+## To find files with setuid bit set
+find . -xdev \( -perm -4000 \) -type f -print0 | xargs -0 ls -l
+## To find files with extension '.txt' and remove them
+find ./path/ -name '\*.txt' -exec rm '{}' \;
+## To find files with extension '.txt' and look for a string into them
+find ./path/ -name '\*.txt' | xargs grep 'string'
+## To find files with size bigger than 5 Mebibyte and sort them by size
+find . -size +5M -type f -print0 | xargs -0 ls -Ssh | sort -z
+## To find files bigger than 2 Megabyte and list them
+find . -type f -size +200000000c -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'
+## To find files modified more than 7 days ago and list file information
+find . -type f -mtime +7d -ls
+## To find symlinks owned by a user and list file information
+find . -type l -user -ls
+## To search for and delete empty directories
+find . -type d -empty -exec rmdir {} \;
+## To search for directories named build at a max depth of 2 directories
+find . -maxdepth 2 -name build -type d
+## To search all files who are not in .git directory
+find . ! -iwholename '*.git*' -type f
+## To find all files that have the same node (hard link) as MY_FILE_HERE
+find . -type f -samefile MY_FILE_HERE 2>/dev/null
+## To find all files in the current directory and modify their permissions
+find . -type f -exec chmod 644 {} \;
+---
+>>>>>>> master
-
---
-
![Preview](https://i.imgur.com/nieW1vp.png)
-
## Wiki Nav
+<<<<<<< HEAD
- [Home](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki)
- [add copy to code blocks.md](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/add-copy-to-code-blocks.md)
@@ -1479,116 +2929,110 @@ find . -name *right.html -type f -exec sed -i 's/target="_parent"//g' {} +
- [web archive.md](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/web-archive.md)
- [wordpress vs headless cms.md](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/wordpress-vs-headless-cms.md)
+=======
+- [Home](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki)
+- [add copy to code blocks.md](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/add-copy-to-code-blocks.md)
+- [Add site search w algolia.md](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/Add-site-search-w-algolia.md)
+- [adding mailing list.md](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/adding-mailing-list.md)
+- [Adding search 2 gatsby site.md](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/Adding-search-2-gatsby-site.md)
+- [awesome.md](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/awesome.md)
+- [broken links.md](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/broken-links.md)
+- [configure custom domain.md](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/configure-custom-domain.md)
+- [contentauthoring.md](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/contentauthoring.md)
+- [full text search w lunar.md](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/full-text-search-w-lunar.md)
+- [inject 4.md](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/inject-4.md)
+- [inject3.md](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/inject3.md)
+- [inject4.md](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/inject4.md)
+- [injected content part2.md](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/injected-content-part2.md)
+- [injected js part4.md](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/injected-js-part4.md)
+- [injected part3.md](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/injected-part3.md)
+- [links 2 embed.md](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/links-2-embed.md)
+- [links to remember](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/links-to-remember)
+- [Netlify Injected Content](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/Netlify-Injected-Content)
+- [old version of index.md](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/old-version-of-index.md)
+- [optimize vscode.md](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/optimize-vscode.md)
+- [possibly useful snippets.md](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/possibly-useful-snippets.md)
+- [privacy policy.md](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/privacy-policy.md)
+- [random stuff.md](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/random-stuff.md)
+- [random.md](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/random.md)
+- [ref type](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/ref-type)
+- [SEO.md](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/SEO.md)
+- [stable points.md](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/stable-points.md)
+- [tech used.md](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/tech-used.md)
+- [Technologies Used.md](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/Technologies-Used.md)
+- [THINGS TO EMBED.md](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/THINGS-TO-EMBED.md)
+- [validation report.md](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/validation-report.md)
+- [web archive.md](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/web-archive.md)
+- [wordpress vs headless cms.md](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki/wordpress-vs-headless-cms.md)
+>>>>>>> master
---
-
## Dependencies
- Click to expand!
+
+ Click to expand!
[![@algolia**](https://avatars.githubusercontent.com/u/2034458?s=40&v=4)](https://github.com/algolia)[algolia / algoliasearch-client-javascript](https://github.com/algolia/algoliasearch-client-javascript)@algolia/client-search
`^ 4.10.3`
-
[![@algolia**](https://avatars.githubusercontent.com/u/2034458?s=40&v=4)](https://github.com/algolia)[algolia / algoliasearch-client-javascript](https://github.com/algolia/algoliasearch-client-javascript)@algolia/client-common
`4.10.5`
-
![@ghost**](https://avatars.githubusercontent.com/u/10137?s=40&v=4)@algolia/requester-common
`4.10.5`
-
[![@algolia**](https://avatars.githubusercontent.com/u/2034458?s=40&v=4)](https://github.com/algolia)[algolia / algoliasearch-client-javascript](https://github.com/algolia/algoliasearch-client-javascript)@algolia/transporter
`4.10.5`
-
[![@stackbit**](https://avatars.githubusercontent.com/u/38996451?s=40&v=4)](https://github.com/stackbit)[stackbit / gatsby-plugin-menus](https://github.com/stackbit/gatsby-plugin-menus)@stackbit/gatsby-plugin-menus
`0.0.4`
-
[![@facebook**](https://avatars.githubusercontent.com/u/69631?s=40&v=4)](https://github.com/facebook)[facebook / jest](https://github.com/facebook/jest)babel-jest
`^ 24.7.1`
-
[![@gatsbyjs**](https://avatars.githubusercontent.com/u/12551863?s=40&v=4)](https://github.com/gatsbyjs)[gatsbyjs / gatsby](https://github.com/gatsbyjs/gatsby)babel-preset-gatsby
`^ 0.1.11`
-
[![@gatsbyjs**](https://avatars.githubusercontent.com/u/12551863?s=40&v=4)](https://github.com/gatsbyjs)[gatsbyjs / gatsby](https://github.com/gatsbyjs/gatsby) `^ 2.5.0`
-
[![@keyz**](https://avatars.githubusercontent.com/u/2268452?s=40&u=c3f56fe1d943474ffe4577a82ad79c1a79d7eb6e&v=4)](https://github.com/keyz)[keyz / identity-obj-proxy](https://github.com/keyz/identity-obj-proxy) `^ 3.0.0`
-
[![@facebook**](https://avatars.githubusercontent.com/u/69631?s=40&v=4)](https://github.com/facebook)[facebook / jest](https://github.com/facebook/jest) `^ 24.7.1`
-
[![@lodash**](https://avatars.githubusercontent.com/u/2565403?s=40&v=4)](https://github.com/lodash)[lodash / lodash](https://github.com/lodash/lodash) `^ 4.17.11`
-
[![@facebook**](https://avatars.githubusercontent.com/u/69631?s=40&v=4)](https://github.com/facebook)[facebook / react](https://github.com/facebook/react)react-test-renderer
`^ 16.8.6`
-
[![@getkirby-v2**](https://avatars.githubusercontent.com/u/6985611?s=40&v=4)](https://github.com/getkirby-v2)[getkirby-v2 / algolia-plugin](https://github.com/getkirby-v2/algolia-plugin)algolia
`0.0.0`
-
[![@ecomfe**](https://avatars.githubusercontent.com/u/2268460?s=40&v=4)](https://github.com/ecomfe)[ecomfe / babel-runtime](https://github.com/ecomfe/babel-runtime) `6.26.0`
-
[![@paulmillr**](https://avatars.githubusercontent.com/u/574696?s=40&u=7f4396380d73af134b898c8eaf7bb171f448f40f&v=4)](https://github.com/paulmillr)[paulmillr / chokidar](https://github.com/paulmillr/chokidar) `3.4.0`
-
[![@DefinitelyTyped**](https://avatars.githubusercontent.com/u/3637556?s=40&v=4)](https://github.com/DefinitelyTyped)[DefinitelyTyped / DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped)@types/node
`^ 13`
-
[![@micromatch**](https://avatars.githubusercontent.com/u/26890389?s=40&v=4)](https://github.com/micromatch)[micromatch / anymatch](https://github.com/micromatch/anymatch) `~ 3.1.1`
-
[![@micromatch**](https://avatars.githubusercontent.com/u/26890389?s=40&v=4)](https://github.com/micromatch)[micromatch / braces](https://github.com/micromatch/braces) `~ 3.0.2`
-
[![@chaijs**](https://avatars.githubusercontent.com/u/1515293?s=40&v=4)](https://github.com/chaijs)[chaijs / chai](https://github.com/chaijs/chai) `^ 4.2`
-
[![@microsoft**](https://avatars.githubusercontent.com/u/6154722?s=40&v=4)](https://github.com/microsoft)[microsoft / dtslint](https://github.com/microsoft/dtslint) `^ 3.3.0`
-
[![@eslint**](https://avatars.githubusercontent.com/u/6019716?s=40&v=4)](https://github.com/eslint)[eslint / eslint](https://github.com/eslint/eslint) `^ 6.6.0`
-
[![@fsevents**](https://avatars.githubusercontent.com/u/48760001?s=40&v=4)](https://github.com/fsevents)[fsevents / fsevents](https://github.com/fsevents/fsevents) `~ 2.1.2`
-
[![@gulpjs**](https://avatars.githubusercontent.com/u/6200624?s=40&v=4)](https://github.com/gulpjs)[gulpjs / glob-parent](https://github.com/gulpjs/glob-parent) `~ 5.1.0`
-
[![@sindresorhus**](https://avatars.githubusercontent.com/u/170270?s=40&u=34acd557a042ac478d273a4621570cadb6b0bd89&v=4)](https://github.com/sindresorhus)[sindresorhus / is-binary-path](https://github.com/sindresorhus/is-binary-path) `~ 2.1.0`
-
[![@micromatch**](https://avatars.githubusercontent.com/u/26890389?s=40&v=4)](https://github.com/micromatch)[micromatch / is-glob](https://github.com/micromatch/is-glob) `~ 4.0.1`
-
[![@mochajs**](https://avatars.githubusercontent.com/u/8770005?s=40&v=4)](https://github.com/mochajs)[mochajs / mocha](https://github.com/mochajs/mocha) `^ 7.0.0`
-
[![@jonschlinkert**](https://avatars.githubusercontent.com/u/383994?s=40&u=335f06277f72722162e89bd5516849f2e82f37cf&v=4)](https://github.com/jonschlinkert)[jonschlinkert / normalize-path](https://github.com/jonschlinkert/normalize-path) `~ 3.0.0`
-
[![@istanbuljs**](https://avatars.githubusercontent.com/u/13523395?s=40&v=4)](https://github.com/istanbuljs)[istanbuljs / nyc](https://github.com/istanbuljs/nyc) `^ 15.0.0`
-
[![@paulmillr**](https://avatars.githubusercontent.com/u/574696?s=40&u=7f4396380d73af134b898c8eaf7bb171f448f40f&v=4)](https://github.com/paulmillr)[paulmillr / readdirp](https://github.com/paulmillr/readdirp) `~ 3.4.0`
-
[![@isaacs**](https://avatars.githubusercontent.com/u/9287?s=40&u=60a280618307ae965cadbe52da4baa7e351c848c&v=4)](https://github.com/isaacs)[isaacs / rimraf](https://github.com/isaacs/rimraf) `^ 3.0.0`
-
[![@sinonjs**](https://avatars.githubusercontent.com/u/6570253?s=40&v=4)](https://github.com/sinonjs)[sinonjs / sinon](https://github.com/sinonjs/sinon) `^ 9.0.1`
-
[![@domenic**](https://avatars.githubusercontent.com/u/617481?s=40&v=4)](https://github.com/domenic)[domenic / sinon-chai](https://github.com/domenic/sinon-chai) `^ 3.3.0`
-
[![@anodynos**](https://avatars.githubusercontent.com/u/856453?s=40&v=4)](https://github.com/anodynos)[anodynos / upath](https://github.com/anodynos/upath) `^ 1.2.0`
-
[![@JedWatson**](https://avatars.githubusercontent.com/u/872310?s=40&u=9548676d01f104232ee42e5ac0d985db77e6a5a4&v=4)](https://github.com/JedWatson)[JedWatson / classnames](https://github.com/JedWatson/classnames) `2.2.6`
-
[![@bestiejs**](https://avatars.githubusercontent.com/u/802850?s=40&v=4)](https://github.com/bestiejs)[bestiejs / benchmark.js](https://github.com/bestiejs/benchmark.js)benchmark
`^ 1.0.0`
-
[![@browserify**](https://avatars.githubusercontent.com/u/6320506?s=40&v=4)](https://github.com/browserify)[browserify / browserify](https://github.com/browserify/browserify) `^ 14.1.0`
-
[![@mochajs**](https://avatars.githubusercontent.com/u/8770005?s=40&v=4)](https://github.com/mochajs)[mochajs / mocha](https://github.com/mochajs/mocha) `^ 2.1.0`
-
[![@jeromedecoster**](https://avatars.githubusercontent.com/u/158071?s=40&u=470a733fdc34a9fedab18ae4cf5109d2ea357425&v=4)](https://github.com/jeromedecoster)[jeromedecoster / opn-cli](https://github.com/jeromedecoster/opn-cli) `^ 3.1.0`
-
[![@documentationjs**](https://avatars.githubusercontent.com/u/11415556?s=40&v=4)](https://github.com/documentationjs)[documentationjs / documentation](https://github.com/documentationjs/documentation) `^ 13.2.5`
-
[![@babel**](https://avatars.githubusercontent.com/u/9637642?s=40&v=4)](https://github.com/babel)[babel / babel](https://github.com/babel/babel)@babel/core
`7.12.3`
-
[Cloudfare-Backup](https://bgoonz-blog-2-0.pages.dev/) ↞↠ Search Website: [search](https://www.algolia.com/realtime-search-demo/web-dev-resource-hub-9e6b8aa8-6106-44c5-9f59-ff3f9531abd4) ↞↠ [Backup Repo Deploy](https://bgoonzblog20-backup.netlify.app/#gsc.tab=0) ↞↠ [Github pages](https://bgoonz.github.io/BGOONZ_BLOG_2.0/) ↞↠ [Go To Site Wiki](https://github.com/bgoonz/BGOONZ_BLOG_2.0/wiki)
-
-
---
-
## Docs Structure
- Docs Structure
+
+ Docs Structure
```
├── blog
│ ├── 300-react-questions.md
@@ -1815,10 +3259,9 @@ find . -name *right.html -type f -exec sed -i 's/target="_parent"//g' {} +
├── readme.md
├── showcase.md
└── tree.md
-
23 directories, 202 files
-
```
+<<<<<<< HEAD
# SITEMAP
@@ -2212,52 +3655,258 @@ find . -name *right.html -type f -exec sed -i 's/target="_parent"//g' {} +
## [**🌍⇒docs/tutorials/google-lighthouse-cli🗺️**](https://bgoonz-blog.netlify.app/docs/tutorials/google-lighthouse-cli)
+=======
+## SITEMAP
+[**🌍⇒https://bgoonz-blog.netlify.app/🗺️**](https://bgoonz-blog.netlify.app/)
+[**🌍⇒blog🗺️**](https://bgoonz-blog.netlify.app/blog)
+[**🌍⇒docs🗺️**](https://bgoonz-blog.netlify.app/docs)
+[**🌍⇒readme🗺️**](https://bgoonz-blog.netlify.app/readme)
+[**🌍⇒review🗺️**](https://bgoonz-blog.netlify.app/review)
+[**🌍⇒showcase🗺️**](https://bgoonz-blog.netlify.app/showcase)
+[**🌍⇒blog/awesome-graphql🗺️**](https://bgoonz-blog.netlify.app/blog/awesome-graphql)
+[**🌍⇒blog/big-o-complexity🗺️**](https://bgoonz-blog.netlify.app/blog/big-o-complexity)
+[**🌍⇒blog/blog-archive🗺️**](https://bgoonz-blog.netlify.app/blog/blog-archive)
+[**🌍⇒blog/blogwcomments🗺️**](https://bgoonz-blog.netlify.app/blog/blogwcomments)
+[**🌍⇒blog/data-structures🗺️**](https://bgoonz-blog.netlify.app/blog/data-structures)
+[**🌍⇒blog/flow-control-in-python🗺️**](https://bgoonz-blog.netlify.app/blog/flow-control-in-python)
+[**🌍⇒blog/functions-in-python🗺️**](https://bgoonz-blog.netlify.app/blog/functions-in-python)
+[**🌍⇒blog/git-gateway🗺️**](https://bgoonz-blog.netlify.app/blog/git-gateway)
+[**🌍⇒blog/interview-questions-js🗺️**](https://bgoonz-blog.netlify.app/blog/interview-questions-js)
+[**🌍⇒blog/media-queries-explained🗺️**](https://bgoonz-blog.netlify.app/blog/media-queries-explained)
+[**🌍⇒blog/my-medium🗺️**](https://bgoonz-blog.netlify.app/blog/my-medium)
+[**🌍⇒blog/netlify-cms🗺️**](https://bgoonz-blog.netlify.app/blog/netlify-cms)
+[**🌍⇒blog/platform-docs🗺️**](https://bgoonz-blog.netlify.app/blog/platform-docs)
+[**🌍⇒blog/python-for-js-dev🗺️**](https://bgoonz-blog.netlify.app/blog/python-for-js-dev)
+[**🌍⇒blog/python-resources🗺️**](https://bgoonz-blog.netlify.app/blog/python-resources)
+[**🌍⇒blog/web-dev-trends🗺️**](https://bgoonz-blog.netlify.app/blog/web-dev-trends)
+[**🌍⇒blog/web-scraping🗺️**](https://bgoonz-blog.netlify.app/blog/web-scraping)
+[**🌍⇒docs/about🗺️**](https://bgoonz-blog.netlify.app/docs/about)
+[**🌍⇒docs/articles🗺️**](https://bgoonz-blog.netlify.app/docs/articles)
+[**🌍⇒docs/audio🗺️**](https://bgoonz-blog.netlify.app/docs/audio)
+[**🌍⇒docs/career🗺️**](https://bgoonz-blog.netlify.app/docs/career)
+[**🌍⇒docs/community🗺️**](https://bgoonz-blog.netlify.app/docs/community)
+[**🌍⇒docs/content🗺️**](https://bgoonz-blog.netlify.app/docs/content)
+[**🌍⇒docs/docs🗺️**](https://bgoonz-blog.netlify.app/docs/docs)
+[**🌍⇒docs/faq🗺️**](https://bgoonz-blog.netlify.app/docs/faq)
+[**🌍⇒docs/gallery🗺️**](https://bgoonz-blog.netlify.app/docs/gallery)
+[**🌍⇒docs/interact🗺️**](https://bgoonz-blog.netlify.app/docs/interact)
+[**🌍⇒docs/javascript🗺️**](https://bgoonz-blog.netlify.app/docs/javascript)
+[**🌍⇒docs/leetcode🗺️**](https://bgoonz-blog.netlify.app/docs/leetcode)
+[**🌍⇒docs/other-content🗺️**](https://bgoonz-blog.netlify.app/docs/other-content)
+[**🌍⇒docs/privacy-policy🗺️**](https://bgoonz-blog.netlify.app/docs/privacy-policy)
+[**🌍⇒docs/projects🗺️**](https://bgoonz-blog.netlify.app/docs/projects)
+[**🌍⇒docs/python🗺️**](https://bgoonz-blog.netlify.app/docs/python)
+[**🌍⇒docs/quick-reference🗺️**](https://bgoonz-blog.netlify.app/docs/quick-reference)
+[**🌍⇒docs/react🗺️**](https://bgoonz-blog.netlify.app/docs/react)
+[**🌍⇒docs/reference🗺️**](https://bgoonz-blog.netlify.app/docs/reference)
+[**🌍⇒docs/search🗺️**](https://bgoonz-blog.netlify.app/docs/search)
+[**🌍⇒docs/sitemap🗺️**](https://bgoonz-blog.netlify.app/docs/sitemap)
+[**🌍⇒docs/tools🗺️**](https://bgoonz-blog.netlify.app/docs/tools)
+[**🌍⇒docs/tutorials🗺️**](https://bgoonz-blog.netlify.app/docs/tutorials)
+[**🌍⇒docs/about/eng-portfolio🗺️**](https://bgoonz-blog.netlify.app/docs/about/eng-portfolio)
+[**🌍⇒docs/about/ideas-for-this-website🗺️**](https://bgoonz-blog.netlify.app/docs/about/ideas-for-this-website)
+[**🌍⇒docs/about/intrests🗺️**](https://bgoonz-blog.netlify.app/docs/about/intrests)
+[**🌍⇒docs/about/interview🗺️**](https://bgoonz-blog.netlify.app/docs/about/interview)
+[**🌍⇒docs/about/resume🗺️**](https://bgoonz-blog.netlify.app/docs/about/resume)
+[**🌍⇒docs/articles/basic-web-dev🗺️**](https://bgoonz-blog.netlify.app/docs/articles/basic-web-dev)
+[**🌍⇒docs/articles/buffers🗺️**](https://bgoonz-blog.netlify.app/docs/articles/buffers)
+[**🌍⇒docs/articles/dev-dep🗺️**](https://bgoonz-blog.netlify.app/docs/articles/dev-dep)
+[**🌍⇒docs/articles/event-loop🗺️**](https://bgoonz-blog.netlify.app/docs/articles/event-loop)
+[**🌍⇒docs/articles/fs-module🗺️**](https://bgoonz-blog.netlify.app/docs/articles/fs-module)
+[**🌍⇒docs/articles/how-the-web-works🗺️**](https://bgoonz-blog.netlify.app/docs/articles/how-the-web-works)
+[**🌍⇒docs/articles/http🗺️**](https://bgoonz-blog.netlify.app/docs/articles/http)
+[**🌍⇒docs/articles/install🗺️**](https://bgoonz-blog.netlify.app/docs/articles/install)
+[**🌍⇒docs/articles/intro🗺️**](https://bgoonz-blog.netlify.app/docs/articles/intro)
+[**🌍⇒docs/articles/media-queries-no-more🗺️**](https://bgoonz-blog.netlify.app/docs/articles/media-queries-no-more)
+[**🌍⇒docs/articles/module-exports🗺️**](https://bgoonz-blog.netlify.app/docs/articles/module-exports)
+[**🌍⇒docs/articles/nextjs🗺️**](https://bgoonz-blog.netlify.app/docs/articles/nextjs)
+[**🌍⇒docs/articles/node-api-express🗺️**](https://bgoonz-blog.netlify.app/docs/articles/node-api-express)
+[**🌍⇒docs/articles/node-cli-args🗺️**](https://bgoonz-blog.netlify.app/docs/articles/node-cli-args)
+[**🌍⇒docs/articles/node-common-modules🗺️**](https://bgoonz-blog.netlify.app/docs/articles/node-common-modules)
+[**🌍⇒docs/articles/node-env-variables🗺️**](https://bgoonz-blog.netlify.app/docs/articles/node-env-variables)
+[**🌍⇒docs/articles/node-js-language🗺️**](https://bgoonz-blog.netlify.app/docs/articles/node-js-language)
+[**🌍⇒docs/articles/node-package-manager🗺️**](https://bgoonz-blog.netlify.app/docs/articles/node-package-manager)
+[**🌍⇒docs/articles/node-repl🗺️**](https://bgoonz-blog.netlify.app/docs/articles/node-repl)
+[**🌍⇒docs/articles/node-run-cli🗺️**](https://bgoonz-blog.netlify.app/docs/articles/node-run-cli)
+[**🌍⇒docs/articles/nodejs🗺️**](https://bgoonz-blog.netlify.app/docs/articles/nodejs)
+[**🌍⇒docs/articles/nodevsbrowser🗺️**](https://bgoonz-blog.netlify.app/docs/articles/nodevsbrowser)
+[**🌍⇒docs/articles/npm🗺️**](https://bgoonz-blog.netlify.app/docs/articles/npm)
+[**🌍⇒docs/articles/npx🗺️**](https://bgoonz-blog.netlify.app/docs/articles/npx)
+[**🌍⇒docs/articles/os-module🗺️**](https://bgoonz-blog.netlify.app/docs/articles/os-module)
+[**🌍⇒docs/articles/package-lock🗺️**](https://bgoonz-blog.netlify.app/docs/articles/package-lock)
+[**🌍⇒docs/articles/reading-files🗺️**](https://bgoonz-blog.netlify.app/docs/articles/reading-files)
+[**🌍⇒docs/articles/semantic🗺️**](https://bgoonz-blog.netlify.app/docs/articles/semantic)
+[**🌍⇒docs/articles/semantic-html🗺️**](https://bgoonz-blog.netlify.app/docs/articles/semantic-html)
+[**🌍⇒docs/articles/the-uniform-resource-locator-(url)🗺️**]()
+[**🌍⇒docs/articles/understanding-firebase🗺️**](https://bgoonz-blog.netlify.app/docs/articles/understanding-firebase)
+[**🌍⇒docs/articles/v8🗺️**](https://bgoonz-blog.netlify.app/docs/articles/v8)
+[**🌍⇒docs/articles/web-standards-checklist🗺️**](https://bgoonz-blog.netlify.app/docs/articles/web-standards-checklist)
+[**🌍⇒docs/articles/webdev-tools🗺️**](https://bgoonz-blog.netlify.app/docs/articles/webdev-tools)
+[**🌍⇒docs/articles/write-2-json-with-python🗺️**](https://bgoonz-blog.netlify.app/docs/articles/write-2-json-with-python)
+[**🌍⇒docs/articles/writing-files🗺️**](https://bgoonz-blog.netlify.app/docs/articles/writing-files)
+[**🌍⇒docs/audio/audio🗺️**](https://bgoonz-blog.netlify.app/docs/audio/audio)
+[**🌍⇒docs/audio/audio-feature-extraction🗺️**](https://bgoonz-blog.netlify.app/docs/audio/audio-feature-extraction)
+[**🌍⇒docs/audio/dfft🗺️**](https://bgoonz-blog.netlify.app/docs/audio/dfft)
+[**🌍⇒docs/audio/discrete-fft🗺️**](https://bgoonz-blog.netlify.app/docs/audio/discrete-fft)
+[**🌍⇒docs/audio/dtw-python-explained🗺️**](https://bgoonz-blog.netlify.app/docs/audio/dtw-python-explained)
+[**🌍⇒docs/audio/dynamic-time-warping🗺️**](https://bgoonz-blog.netlify.app/docs/audio/dynamic-time-warping)
+[**🌍⇒docs/audio/web-audio-api🗺️**](https://bgoonz-blog.netlify.app/docs/audio/web-audio-api)
+[**🌍⇒docs/career/confidence🗺️**](https://bgoonz-blog.netlify.app/docs/career/confidence)
+[**🌍⇒docs/career/dev-interview🗺️**](https://bgoonz-blog.netlify.app/docs/career/dev-interview)
+[**🌍⇒docs/career/interview-dos-n-donts🗺️**](https://bgoonz-blog.netlify.app/docs/career/interview-dos-n-donts)
+[**🌍⇒docs/career/job-boards🗺️**](https://bgoonz-blog.netlify.app/docs/career/job-boards)
+[**🌍⇒docs/community/an-open-letter-2-future-developers🗺️**](https://bgoonz-blog.netlify.app/docs/community/an-open-letter-2-future-developers)
+[**🌍⇒docs/community/video-chat🗺️**](https://bgoonz-blog.netlify.app/docs/community/video-chat)
+[**🌍⇒docs/content/algo🗺️**](https://bgoonz-blog.netlify.app/docs/content/algo)
+[**🌍⇒docs/content/archive🗺️**](https://bgoonz-blog.netlify.app/docs/content/archive)
+[**🌍⇒docs/content/data-structures-algo🗺️**](https://bgoonz-blog.netlify.app/docs/content/data-structures-algo)
+[**🌍⇒docs/content/gatsby-Queries-Mutations🗺️**](https://bgoonz-blog.netlify.app/docs/content/gatsby-Queries-Mutations)
+[**🌍⇒docs/content/history-api🗺️**](https://bgoonz-blog.netlify.app/docs/content/history-api)
+[**🌍⇒docs/content/projects🗺️**](https://bgoonz-blog.netlify.app/docs/content/projects)
+[**🌍⇒docs/content/recent-projects🗺️**](https://bgoonz-blog.netlify.app/docs/content/recent-projects)
+[**🌍⇒docs/content/trouble-shooting🗺️**](https://bgoonz-blog.netlify.app/docs/content/trouble-shooting)
+[**🌍⇒docs/docs/appendix🗺️**](https://bgoonz-blog.netlify.app/docs/docs/appendix)
+[**🌍⇒docs/docs/bash🗺️**](https://bgoonz-blog.netlify.app/docs/docs/bash)
+[**🌍⇒docs/docs/content🗺️**](https://bgoonz-blog.netlify.app/docs/docs/content)
+[**🌍⇒docs/docs/css🗺️**](https://bgoonz-blog.netlify.app/docs/docs/css)
+[**🌍⇒docs/docs/data-structures-docs🗺️**](https://bgoonz-blog.netlify.app/docs/docs/data-structures-docs)
+[**🌍⇒docs/docs/git-reference🗺️**](https://bgoonz-blog.netlify.app/docs/docs/git-reference)
+[**🌍⇒docs/docs/git-repos🗺️**](https://bgoonz-blog.netlify.app/docs/docs/git-repos)
+[**🌍⇒docs/docs/html-spec🗺️**](https://bgoonz-blog.netlify.app/docs/docs/html-spec)
+[**🌍⇒docs/docs/markdown🗺️**](https://bgoonz-blog.netlify.app/docs/docs/markdown)
+[**🌍⇒docs/docs/no-whiteboarding🗺️**](https://bgoonz-blog.netlify.app/docs/docs/no-whiteboarding)
+[**🌍⇒docs/docs/node-docs-complete🗺️**](https://bgoonz-blog.netlify.app/docs/docs/node-docs-complete)
+[**🌍⇒docs/docs/node-docs-full🗺️**](https://bgoonz-blog.netlify.app/docs/docs/node-docs-full)
+[**🌍⇒docs/docs/regex-in-js🗺️**](https://bgoonz-blog.netlify.app/docs/docs/regex-in-js)
+[**🌍⇒docs/docs/sitemap🗺️**](https://bgoonz-blog.netlify.app/docs/docs/sitemap)
+[**🌍⇒docs/faq/contact🗺️**](https://bgoonz-blog.netlify.app/docs/faq/contact)
+[**🌍⇒docs/faq/plug-ins🗺️**](https://bgoonz-blog.netlify.app/docs/faq/plug-ins)
+[**🌍⇒docs/interact/callstack-visual🗺️**](https://bgoonz-blog.netlify.app/docs/interact/callstack-visual)
+[**🌍⇒docs/interact/clock🗺️**](https://bgoonz-blog.netlify.app/docs/interact/clock)
+[**🌍⇒docs/interact/jupyter-notebooks🗺️**](https://bgoonz-blog.netlify.app/docs/interact/jupyter-notebooks)
+[**🌍⇒docs/interact/other-sites🗺️**](https://bgoonz-blog.netlify.app/docs/interact/other-sites)
+[**🌍⇒docs/interact/video-chat🗺️**](https://bgoonz-blog.netlify.app/docs/interact/video-chat)
+[**🌍⇒docs/javascript/arrow-functions🗺️**](https://bgoonz-blog.netlify.app/docs/javascript/arrow-functions)
+[**🌍⇒docs/javascript/await-keyword🗺️**](https://bgoonz-blog.netlify.app/docs/javascript/await-keyword)
+[**🌍⇒docs/javascript/bigo🗺️**](https://bgoonz-blog.netlify.app/docs/javascript/bigo)
+[**🌍⇒docs/javascript/clean-code🗺️**](https://bgoonz-blog.netlify.app/docs/javascript/clean-code)
+[**🌍⇒docs/javascript/constructor-functions🗺️**](https://bgoonz-blog.netlify.app/docs/javascript/constructor-functions)
+[**🌍⇒docs/javascript/promises🗺️**](https://bgoonz-blog.netlify.app/docs/javascript/promises)
+[**🌍⇒docs/javascript/review🗺️**](https://bgoonz-blog.netlify.app/docs/javascript/review)
+[**🌍⇒docs/javascript/this-is-about-this🗺️**](https://bgoonz-blog.netlify.app/docs/javascript/this-is-about-this)
+[**🌍⇒docs/projects/medium-links🗺️**](https://bgoonz-blog.netlify.app/docs/projects/medium-links)
+[**🌍⇒docs/projects/my-websites🗺️**](https://bgoonz-blog.netlify.app/docs/projects/my-websites)
+[**🌍⇒docs/python/at-length🗺️**](https://bgoonz-blog.netlify.app/docs/python/at-length)
+[**🌍⇒docs/python/basics🗺️**](https://bgoonz-blog.netlify.app/docs/python/basics)
+[**🌍⇒docs/python/cheat-sheet🗺️**](https://bgoonz-blog.netlify.app/docs/python/cheat-sheet)
+[**🌍⇒docs/python/comprehensive-guide🗺️**](https://bgoonz-blog.netlify.app/docs/python/comprehensive-guide)
+[**🌍⇒docs/python/examples🗺️**](https://bgoonz-blog.netlify.app/docs/python/examples)
+[**🌍⇒docs/python/flow-control🗺️**](https://bgoonz-blog.netlify.app/docs/python/flow-control)
+[**🌍⇒docs/python/functions🗺️**](https://bgoonz-blog.netlify.app/docs/python/functions)
+[**🌍⇒docs/python/google-sheets-api🗺️**](https://bgoonz-blog.netlify.app/docs/python/google-sheets-api)
+[**🌍⇒docs/python/intro-for-js-devs🗺️**](https://bgoonz-blog.netlify.app/docs/python/intro-for-js-devs)
+[**🌍⇒docs/python/python-ds🗺️**](https://bgoonz-blog.netlify.app/docs/python/python-ds)
+[**🌍⇒docs/python/snippets🗺️**](https://bgoonz-blog.netlify.app/docs/python/snippets)
+[**🌍⇒docs/quick-reference/Emmet🗺️**](https://bgoonz-blog.netlify.app/docs/quick-reference/Emmet)
+[**🌍⇒docs/quick-reference/all-emojis🗺️**](https://bgoonz-blog.netlify.app/docs/quick-reference/all-emojis)
+[**🌍⇒docs/quick-reference/create-react-app🗺️**](https://bgoonz-blog.netlify.app/docs/quick-reference/create-react-app)
+[**🌍⇒docs/quick-reference/git-bash🗺️**](https://bgoonz-blog.netlify.app/docs/quick-reference/git-bash)
+[**🌍⇒docs/quick-reference/git-tricks🗺️**](https://bgoonz-blog.netlify.app/docs/quick-reference/git-tricks)
+[**🌍⇒docs/quick-reference/google-firebase🗺️**](https://bgoonz-blog.netlify.app/docs/quick-reference/google-firebase)
+[**🌍⇒docs/quick-reference/heroku-error-codes🗺️**](https://bgoonz-blog.netlify.app/docs/quick-reference/heroku-error-codes)
+[**🌍⇒docs/quick-reference/installation🗺️**](https://bgoonz-blog.netlify.app/docs/quick-reference/installation)
+[**🌍⇒docs/quick-reference/markdown-dropdowns🗺️**](https://bgoonz-blog.netlify.app/docs/quick-reference/markdown-dropdowns)
+[**🌍⇒docs/quick-reference/minifiction🗺️**](https://bgoonz-blog.netlify.app/docs/quick-reference/minifiction)
+[**🌍⇒docs/quick-reference/new-repo-instructions🗺️**](https://bgoonz-blog.netlify.app/docs/quick-reference/new-repo-instructions)
+[**🌍⇒docs/quick-reference/psql-setup🗺️**](https://bgoonz-blog.netlify.app/docs/quick-reference/psql-setup)
+[**🌍⇒docs/quick-reference/pull-request-rubric🗺️**](https://bgoonz-blog.netlify.app/docs/quick-reference/pull-request-rubric)
+[**🌍⇒docs/quick-reference/quick-links🗺️**](https://bgoonz-blog.netlify.app/docs/quick-reference/quick-links)
+[**🌍⇒docs/quick-reference/topRepos🗺️**](https://bgoonz-blog.netlify.app/docs/quick-reference/topRepos)
+[**🌍⇒docs/quick-reference/understanding-path🗺️**](https://bgoonz-blog.netlify.app/docs/quick-reference/understanding-path)
+[**🌍⇒docs/quick-reference/vscode-themes🗺️**](https://bgoonz-blog.netlify.app/docs/quick-reference/vscode-themes)
+[**🌍⇒docs/react/cheatsheet🗺️**](https://bgoonz-blog.netlify.app/docs/react/cheatsheet)
+[**🌍⇒docs/react/createReactApp🗺️**](https://bgoonz-blog.netlify.app/docs/react/createReactApp)
+[**🌍⇒docs/react/demo🗺️**](https://bgoonz-blog.netlify.app/docs/react/demo)
+[**🌍⇒docs/react/jsx🗺️**](https://bgoonz-blog.netlify.app/docs/react/jsx)
+[**🌍⇒docs/react/react-docs🗺️**](https://bgoonz-blog.netlify.app/docs/react/react-docs)
+[**🌍⇒docs/react/react-in-depth🗺️**](https://bgoonz-blog.netlify.app/docs/react/react-in-depth)
+[**🌍⇒docs/react/react2🗺️**](https://bgoonz-blog.netlify.app/docs/react/react2)
+[**🌍⇒docs/react/render-elements🗺️**](https://bgoonz-blog.netlify.app/docs/react/render-elements)
+[**🌍⇒docs/reference/awesome-lists🗺️**](https://bgoonz-blog.netlify.app/docs/reference/awesome-lists)
+[**🌍⇒docs/reference/awesome-static🗺️**](https://bgoonz-blog.netlify.app/docs/reference/awesome-static)
+[**🌍⇒docs/reference/bookmarks🗺️**](https://bgoonz-blog.netlify.app/docs/reference/bookmarks)
+[**🌍⇒docs/reference/embed-the-web🗺️**](https://bgoonz-blog.netlify.app/docs/reference/embed-the-web)
+[**🌍⇒docs/reference/github-search🗺️**](https://bgoonz-blog.netlify.app/docs/reference/github-search)
+[**🌍⇒docs/reference/how-2-reinstall-npm🗺️**](https://bgoonz-blog.netlify.app/docs/reference/how-2-reinstall-npm)
+[**🌍⇒docs/reference/how-to-kill-a-process🗺️**](https://bgoonz-blog.netlify.app/docs/reference/how-to-kill-a-process)
+[**🌍⇒docs/reference/installing-node🗺️**](https://bgoonz-blog.netlify.app/docs/reference/installing-node)
+[**🌍⇒docs/reference/intro-to-nodejs🗺️**](https://bgoonz-blog.netlify.app/docs/reference/intro-to-nodejs)
+[**🌍⇒docs/reference/notes-template🗺️**](https://bgoonz-blog.netlify.app/docs/reference/notes-template)
+[**🌍⇒docs/reference/psql🗺️**](https://bgoonz-blog.netlify.app/docs/reference/psql)
+[**🌍⇒docs/reference/resources🗺️**](https://bgoonz-blog.netlify.app/docs/reference/resources)
+[**🌍⇒docs/reference/vscode🗺️**](https://bgoonz-blog.netlify.app/docs/reference/vscode)
+[**🌍⇒docs/reference/web-api's🗺️**](https://bgoonz-blog.netlify.app/docs/reference/web-api's)
+[**🌍⇒docs/tools/data-structures🗺️**](https://bgoonz-blog.netlify.app/docs/tools/data-structures)
+[**🌍⇒docs/tools/dev-utilities🗺️**](https://bgoonz-blog.netlify.app/docs/tools/dev-utilities)
+[**🌍⇒docs/tools/google-cloud🗺️**](https://bgoonz-blog.netlify.app/docs/tools/google-cloud)
+[**🌍⇒docs/tools/markdown-html🗺️**](https://bgoonz-blog.netlify.app/docs/tools/markdown-html)
+[**🌍⇒docs/tools/more-tools🗺️**](https://bgoonz-blog.netlify.app/docs/tools/more-tools)
+[**🌍⇒docs/tutorials/google-lighthouse-cli🗺️**](https://bgoonz-blog.netlify.app/docs/tutorials/google-lighthouse-cli)
+>>>>>>> master
-
---
-
---
-
---
+
+
↞↠ Getting Started With GatsbyJS ↞↠
#
-
---
-
## 🚀 Quick start
-
1. **Create a Gatsby site.**
-
Use the Gatsby CLI to create a new site, specifying the default starter.
+<<<<<<< HEAD
```shell
# create a new Gatsby site using the default starter
gatsby new my-default-starter https://github.com/gatsbyjs/gatsby-starter-default
```
+=======
+```bashell
+ # create a new Gatsby site using the default starter
+ gatsby new my-default-starter https://github.com/gatsbyjs/gatsby-starter-default
+```
+>>>>>>> master
1. **Start developing.**
-
Navigate into your new site's directory and start it up.
+<<<<<<< HEAD
```shell
cd my-default-starter/
gatsby develop
```
+=======
+```bashell
+ cd my-default-starter/
+ gatsby develop
+```
+>>>>>>> master
1. **Open the source code and start editing!**
-
Your site is now running at `http://localhost:8000`!
+<<<<<<< HEAD
_Note: You'll also see a second link:_`http://localhost:8000/___graphql`_. This is a tool you can use to experiment with querying your data. Learn more about using this tool in the [Gatsby tutorial](https://www.gatsbyjs.com/tutorial/part-five/#introducing-graphiql)._
+=======
+ *Note: You'll also see a second link:*`http://localhost:8000/___graphql`_. This is a tool you can use to experiment with querying your data. Learn more about using this tool in the [Gatsby tutorial](https://www.gatsbyjs.com/tutorial/part-five/#introducing-graphiql)._
+>>>>>>> master
Open the `my-default-starter` directory in your code editor of choice and edit `src/pages/index.js`. Save your changes and the browser will update in real time!
-
## 🧐 What's inside?
-
A quick look at the top-level files and directories you'll see in a Gatsby project.
-
.
├── node_modules
├── src
@@ -2271,44 +3920,35 @@ A quick look at the top-level files and directories you'll see in a Gatsby proje
├── package-lock.json
├── package.json
└── README.md
-
1. **`/node_modules`**: This directory contains all of the modules of code that your project depends on (npm packages) are automatically installed.
-
2. **`/src`**: This directory will contain all of the code related to what you will see on the front-end of your site (what you see in the browser) such as your site header or a page template. `src` is a convention for "source code".
-
3. **`.gitignore`**: This file tells git which files it should not track / not maintain a version history for.
-
4. **`.prettierrc`**: This is a configuration file for [Prettier](https://prettier.io/). Prettier is a tool to help keep the formatting of your code consistent.
-
5. **`gatsby-browser.js`**: This file is where Gatsby expects to find any usage of the [Gatsby browser APIs](https://www.gatsbyjs.com/docs/browser-apis/) (if any). These allow customization/extension of default Gatsby settings affecting the browser.
-
6. **`gatsby-config.js`**: This is the main configuration file for a Gatsby site. This is where you can specify information about your site (metadata) like the site title and description, which Gatsby plugins you'd like to include, etc. (Check out the [config docs](https://www.gatsbyjs.com/docs/gatsby-config/) for more detail).
-
7. **`gatsby-node.js`**: This file is where Gatsby expects to find any usage of the [Gatsby Node APIs](https://www.gatsbyjs.com/docs/node-apis/) (if any). These allow customization/extension of default Gatsby settings affecting pieces of the site build process.
-
8. **`gatsby-ssr.js`**: This file is where Gatsby expects to find any usage of the [Gatsby server-side rendering APIs](https://www.gatsbyjs.com/docs/ssr-apis/) (if any). These allow customization of default Gatsby settings affecting server-side rendering.
-
9. **`LICENSE`**: This Gatsby starter is licensed under the 0BSD license. This means that you can see this file as a placeholder and replace it with your own license.
-
10. **`package-lock.json`** (See `package.json` below, first). This is an automatically generated file based on the exact versions of your npm dependencies that were installed for your project. **(You won't change this file directly).**
-
11. **`package.json`**: A manifest file for Node.js projects, which includes things like metadata (the project's name, author, etc). This manifest is how npm knows which packages to install for your project.
-
12. **`README.md`**: A text file containing useful reference information about your project.
-
## 🎓 Learning Gatsby
-
Looking for more guidance? Full documentation for Gatsby lives [on the website](https://www.gatsbyjs.com/). Here are some places to start:
+<<<<<<< HEAD
- **For most developers, we recommend starting with our [in-depth tutorial for creating a site with Gatsby**](https://www.gatsbyjs.com/tutorial/).\*\* It starts with zero assumptions about your level of ability and walks through every step of the process.
-
- **To dive straight into code samples, head [to our documentation**](https://www.gatsbyjs.com/docs/).\*\* In particular, check out the _Guides_, _API Reference_, and _Advanced Tutorials_ sections in the sidebar.
+=======
+- **For most developers, we recommend starting with our [in-depth tutorial for creating a site with Gatsby**](https://www.gatsbyjs.com/tutorial/).\*\* It starts with zero assumptions about your level of ability and walks through every step of the process.
+-
+- **To dive straight into code samples, head [to our documentation**](https://www.gatsbyjs.com/docs/).\*\* In particular, check out the *Guides*, *API Reference*, and *Advanced Tutorials* sections in the sidebar.
+>>>>>>> master
## 💫 Deploy
-
[![Deploy to Netlify**](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/BGOONZ_BLOG_2.0.git)
-
[![Deploy with Vercel**](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/BGOONZ_BLOG_2.0.git)
+<<<<<<< HEAD
@@ -2316,15 +3956,71 @@ Looking for more guidance? Full documentation for Gatsby lives [on the website](
# Gatsby Project Structure | Gatsby
+=======
+---
+### Gatsby With Netlify CMS
+This tutorial will use [gatsby-personal-starter-blog](https://github.com/thomaswang/gatsby-personal-starter-blog), a Gatsby starter based on the official [gatsby-starter-blog](/starters/gatsbyjs/gatsby-starter-blog/). The differences are that `gatsby-personal-starter-blog` is configured to run the blog on a subdirectory, `/blog`, and comes pre-installed with [Netlify CMS](https://www.netlifycms.org/) for content editing. It also adds VS Code highlighting for code blocks.
+## Prerequisites
+- A GitHub account
+- The [Gatsby CLI](/docs/reference/gatsby-cli/) installed
+## Set up a Netlify CMS-managed Gatsby site in 5 steps
+### Step 1
+Open your Terminal and run the following command from the Gatsby CLI to create a new Gatsby site using [gatsby-personal-starter-blog](https://github.com/thomaswang/gatsby-personal-starter-blog).
+```shell
+gatsby new [your-project-name] https://github.com/thomaswangio/gatsby-personal-starter-blog
+```
+### Step 2
+Once the Gatsby site is finished installing all the packages and dependencies, you can now go into the directory and run the site locally.
+```shell
+cd [your-project-name]
+gatsby develop
+```
+Now you can go to `http://localhost:8000` to see your new site, but what's extra cool is that Netlify CMS is pre-installed and you can access it at `http://localhost:8000/admin`
+A CMS, or content management system, is useful because you can add content like blog posts from a dashboard on your site, instead of having to add posts manually with Markdown. However, you'll likely want to be able to access the CMS from a deployed website, not just locally. For that, you'll need to deploy to Netlify through GitHub, set up continuous deployment, and do a few configurations. You'll go over this in [Step-5](#step-5).
+### Step 3
+Open the project in your code editor and open `static/admin/config.yml`. Replace `your-username/your-repo-name` with your GitHub username and project name. This step is important for managing and deploying the Netlify CMS interface.
+```diff
+backend:
+- name: test-repo
++ name: github
++ repo: your-username/your-repo-name
+```
+#### Customizing your site
+Head into `gatsby-config.js` and you can edit your siteMetadata, add a Google Analytics tracking ID, and your app icon/favicon. Test out the edits for the deployed build by quitting the development server and running `gatsby build && gatsby serve`.
+You'll likely also want to edit the `README.md` and `package.json` files to include your own project details.
+### Step 4
+Open [github.com](https://github.com) and create a new repository, with the same name as your project. Push your new Gatsby site's code to GitHub using the following Terminal commands:
+```shell
+git init
+git add .
+git commit -m "initial commit"
+git remote add origin https://github.com/[your-username]/[your-repo-name].git
+git push -u origin master
+```
+Then, open [app.netlify.com](https://app.netlify.com) and add a "New site from Git". Choose your newly created repo and click on "Deploy site" with the default deployment settings.
+> *Note: if you don't see the correct repo listed, you may need to install or reconfigure the Netlify app on GitHub.*
+![Netlify Dashboard for Creating a new site](netlify-dashboard.png)
+### Step 5
+To make sure that Netlify CMS has access to your GitHub repo, you need to set up an OAuth application on GitHub. The instructions for that are here: [Netlify's Using an Authorization Provider](https://www.netlify.com/docs/authentication-providers/#using-an-authentication-provider).
+For the "Homepage URL" – you can use your Netlify subdomain, `[name-of-your-site].netlify.com`, or you can use a custom domain. To customize the subdomain, look for the "Edit site name" field under "Domain Management" for your project on the [Netlify app](https://app.netlify.com). To connect your Netlify site to your custom domain instead, see [Netlify’s instructions on custom domains](https://www.netlify.com/docs/custom-domains/).
+Once you've configured an authentication provider then you'll be able to use Netlify CMS at your deployed site to add new posts.
+![Netlify and GitHub Authorization](https://cdn.netlify.com/67edd5b656c432888d736cd40125cb61376905bb/c1cba/img/docs/github-oauth-config.png)
+Copy the credentials of your new app listed on [GitHub OAuth Apps](https://github.com/settings/developers) and install a new auth provider on Netlify using them.
+![Setting up access control](netlify-install-oauth-provider.png)
+#### Benefits of Netlify CMS, GitHub, and Netlify Workflow
+Congrats! Now that Netlify CMS is successfully configured to your project, every time you add a new post, the content will be stored in your repository and versioned on GitHub because Netlify CMS is Git-based. Also, thanks to [Netlify's Continuous Deployment](https://www.netlify.com/docs/continuous-deployment/), a new version will be deployed every time you add or edit a post.
+You can learn more about Netlify CMS and how to configure it further in the [Netlify CMS documentation](https://www.netlifycms.org/docs/intro/)
+---
+---
+## Gatsby Project Structure | Gatsby
+>>>>>>> master
> ## Excerpt
>
> Inside a Gatsby project, you may see some or all of the following folders and files: Folders /.cache Automatically generated. This folder…
-
---
-
Inside a Gatsby project, you may see some or all of the following folders and files:
-
```
+<<<<<<< HEAD
/|-- /.cache|-- /plugins|-- /public|-- /src |-- /api |-- /pages |-- /templates |-- html.js|-- /static|-- gatsby-config.js|-- gatsby-node.js|-- gatsby-ssr.js|-- gatsby-browser.js
```
@@ -2351,19 +4047,56 @@ Inside a Gatsby project, you may see some or all of the following folders and fi
## [](https://www.gatsbyjs.com/docs/reference/gatsby-project-structure/#miscellaneous)Miscellaneous
+=======
+/|
+-- /.cache
+|-- /plugins
+|-- /public
+|-- /src
+|-- /api
+|-- /pages
+|-- /templates
+|-- html.js
+|-- /static
+|-- gatsby-config.js
+|-- gatsby-node.js
+|-- gatsby-ssr.js
+|-- gatsby-browser.js
+```
+[Folders](https://www.gatsbyjs.com/docs/reference/gatsby-project-structure/#folders)
+- **`/.cache`** *Automatically generated.* This folder is an internal cache created automatically by Gatsby. The files inside this folder are not meant for modification. Should be added to the `.gitignore` file if not added already.
+- **`/plugins`** This folder hosts any project-specific ("local") plugins that aren't published as an `npm` package. Check out the [plugin docs](https://www.gatsbyjs.com/docs/plugins/) for more detail.
+- **`/public`** *Automatically generated.* The output of the build process will be exposed inside this folder. Should be added to the `.gitignore` file if not added already.
+- **`/src`** This directory will contain all of the code related to what you will see on the frontend of your site (what you see in the browser), like your site header, or a page template. "src" is a convention for "source code".
+ - **`/api`** JavaScript and TypeScript files under `src/api` become functions automatically with paths based on their file name. Check out the [functions guide](https://www.gatsbyjs.com/docs/reference/functions/) for more detail.
+ - **`/pages`** Components under `src/pages` become pages automatically with paths based on their file name. Check out the [pages recipes](https://www.gatsbyjs.com/docs/recipes/pages-layouts) for more detail.
+ - **`/templates`** Contains templates for programmatically creating pages. Check out the [templates docs](https://www.gatsbyjs.com/docs/conceptual/building-with-components/#page-template-components) for more detail.
+ - **`html.js`** For custom configuration of default `.cache/default_html.js`. Check out the [custom HTML docs](https://www.gatsbyjs.com/docs/custom-html/) for more detail.
+- **`/static`** If you put a file into the static folder, it will not be processed by webpack. Instead it will be copied into the public folder untouched. Check out the [assets docs](https://www.gatsbyjs.com/docs/how-to/images-and-media/static-folder/#adding-assets-outside-of-the-module-system) for more detail.
+[Files](https://www.gatsbyjs.com/docs/reference/gatsby-project-structure/#files)
+- **`gatsby-browser.js`**: This file is where Gatsby expects to find any usage of the [Gatsby browser APIs](https://www.gatsbyjs.com/docs/reference/config-files/gatsby-browser/) (if any). These allow customization/extension of default Gatsby settings affecting the browser.
+- **`gatsby-config.js`**: This is the main configuration file for a Gatsby site. This is where you can specify information about your site (metadata) like the site title and description, which Gatsby plugins you'd like to include, etc. Check out the [config docs](https://www.gatsbyjs.com/docs/reference/config-files/gatsby-config/) for more detail.
+- **`gatsby-node.js`**: This file is where Gatsby expects to find any usage of the [Gatsby node APIs](https://www.gatsbyjs.com/docs/reference/config-files/gatsby-node/) (if any). These allow customization/extension of default Gatsby settings affecting pieces of the site build process.
+- **`gatsby-ssr.js`**: This file is where Gatsby expects to find any usage of the [Gatsby server-side rendering APIs](https://www.gatsbyjs.com/docs/reference/config-files/gatsby-ssr/) (if any). These allow customization of default Gatsby settings affecting server-side rendering.
+[Misc](https://www.gatsbyjs.com/docs/reference/gatsby-project-structure/#miscellaneous)
+[Misc](https://www.gatsbyjs.com/docs/reference/gatsby-project-structure/#miscellaneous)
+>>>>>>> master
The file/folder structure described above reflects Gatsby-specific files and folders. Since Gatsby sites are also React apps, it's common to use standard React code organization patterns such as folders like `/components` and `/utils` inside `/src`. The [React docs](https://reactjs.org/docs/faq-structure.html) have more information on a typical React app folder structure.
-
---
+<<<<<<< HEAD
# Layout Components | Gatsby
> ## Excerpt
>
+=======
+#### Layout Components | Gatsby
+## Excerpt
+>>>>>>> master
> In this guide, you'll learn Gatsby's approach to layouts, how to create and use layout components, and how to prevent layout components from…
-
---
-
In this guide, you'll learn Gatsby's approach to layouts, how to create and use layout components, and how to prevent layout components from unmounting.
+<<<<<<< HEAD
## [](https://www.gatsbyjs.com/docs/how-to/routing/layout-components/#gatsbys-approach-to-layouts)Gatsby's approach to layouts
@@ -2375,49 +4108,59 @@ Layout components are for sections of your site that you want to share across mu
## [](https://www.gatsbyjs.com/docs/how-to/routing/layout-components/#how-to-create-layout-components)How to create layout components
+=======
+[Gatsby's approach to layouts](https://www.gatsbyjs.com/docs/how-to/routing/layout-components/#gatsbys-approach-to-layouts)
+Gatsby does not, by default, automatically apply layouts to pages (there are, however, ways to do so which will be covered in a later section). Instead, Gatsby follows React's compositional model of importing and using components. This makes it possible to create multiple levels of layouts, e.g. a global header and footer, and then on some pages, a sidebar menu. It also makes it possible to pass data between layout and page components.
+[What are layout components?](https://www.gatsbyjs.com/docs/how-to/routing/layout-components/#what-are-layout-components)
+Layout components are for sections of your site that you want to share across multiple pages. For example, Gatsby sites will commonly have a layout component with a shared header and footer. Other common things to add to layouts are a sidebar and/or navigation menu. On this page for example, the header at the top is part of gatsbyjs.com's layout component.
+[How to create layout components](https://www.gatsbyjs.com/docs/how-to/routing/layout-components/#how-to-create-layout-components)
+>>>>>>> master
It is recommended to create your layout components alongside the rest of your components (e.g. into `src/components/`).
-
Here is an example of a very basic layout component at `src/components/layout.js`:
-
```
import React from "react"export default function Layout({ children }) { return (
{children}
)}
```
+<<<<<<< HEAD
## [](https://www.gatsbyjs.com/docs/how-to/routing/layout-components/#how-to-import-and-add-layout-components-to-pages)How to import and add layout components to pages
+=======
+[](https://www.gatsbyjs.com/docs/how-to/routing/layout-components/#how-to-import-and-add-layout-components-to-pages)How to import and add layout components to pages
+>>>>>>> master
If you want to apply a layout to a page, you will need to include the `Layout` component and wrap your page in it. For example, here is how you would apply your layout to the front page:
-
```
import React from "react"import Layout from "../components/layout"export default function Home() { return (
I'm in a layout!
);}
```
-
Repeat for every page and template that needs this layout.
+<<<<<<< HEAD
## [](https://www.gatsbyjs.com/docs/how-to/routing/layout-components/#how-to-prevent-layout-components-from-unmounting)How to prevent layout components from unmounting
+=======
+[How to prevent layout components from unmounting](https://www.gatsbyjs.com/docs/how-to/routing/layout-components/#how-to-prevent-layout-components-from-unmounting)
+>>>>>>> master
As mentioned earlier, Gatsby does not, by default, automatically wrap pages in a layout component. The "top level" component is the page itself. As a result, when the "top level" component changes between pages, React will re-render all children. This means that shared components like navigations will unmount and remount. This will break CSS transitions or React state within those shared components.
-
If you need to set a wrapper component around page components that won't get unmounted on page changes, use the **`wrapPageElement`** [browser API](https://www.gatsbyjs.com/docs/reference/config-files/gatsby-browser/#wrapPageElement) and the [SSR equivalent](https://www.gatsbyjs.com/docs/reference/config-files/gatsby-ssr/#wrapPageElement).
-
Alternatively, you can prevent your layout component from unmounting by using [gatsby-plugin-layout](https://www.gatsbyjs.com/plugins/gatsby-plugin-layout/), which implements the `wrapPageElement` APIs for you.
+<<<<<<< HEAD
# Adding Markdown Pages | Gatsby
+=======
+## Adding Markdown Pages | Gatsby
+>>>>>>> master
> ## Excerpt
>
> Gatsby can use Markdown files to create pages in your site.
> You add plugins to read and understand folders with Markdown files and from them…
-
---
-
Gatsby can use Markdown files to create pages in your site. You add plugins to read and understand folders with Markdown files and from them create pages automatically.
-
Here are the steps Gatsby follows for making this happen.
-
1. Read files into Gatsby from the filesystem
2. Transform Markdown to HTML and [frontmatter](https://www.gatsbyjs.com/docs/how-to/routing/adding-markdown-pages/#frontmatter-for-metadata-in-markdown-files) to data
3. Add a Markdown file
4. Create a Collection Route component for the Markdown files
+<<<<<<< HEAD
## [](https://www.gatsbyjs.com/docs/how-to/routing/adding-markdown-pages/#read-files-into-gatsby-from-the-filesystem)Read files into Gatsby from the filesystem
@@ -2429,13 +4172,32 @@ Use the plugin [`gatsby-source-filesystem`](https://www.gatsbyjs.com/plugins/gat
## [](https://www.gatsbyjs.com/docs/how-to/routing/adding-markdown-pages/#add-plugin)Add plugin
+=======
+[](https://www.gatsbyjs.com/docs/how-to/routing/adding-markdown-pages/#read-files-into-gatsby-from-the-filesystem)Read files into Gatsby from the filesystem
+Use the plugin [`gatsby-source-filesystem`](https://www.gatsbyjs.com/plugins/gatsby-source-filesystem/#gatsby-source-filesystem) to read files.
+[](https://www.gatsbyjs.com/docs/how-to/routing/adding-markdown-pages/#install)Install
+`npm install gatsby-source-filesystem`
+[Add Plugin](https://www.gatsbyjs.com/docs/how-to/routing/adding-markdown-pages/#add-plugin)Add plugin
+>>>>>>> master
Open `gatsby-config.js` to add the `gatsby-source-filesystem` plugin. The `path` option is how you set the directory to search for files.
-
```
+<<<<<<< HEAD
module.exports = { siteMetadata: { title: "My Gatsby Site", }, plugins: [ { resolve: `gatsby-source-filesystem`, options: { name: `markdown-pages`, path: `${__dirname}/src/markdown-pages`, }, }, ],}
+=======
+module.exports = { siteMetadata: {
+ title: "My Gatsby Site", },
+plugins: [ {
+ resolve: `gatsby-source-filesystem`,
+options: {
+ name: `markdown-pages`,
+ path: `${__dirname}/src/markdown-pages`,
+},
+ },
+],}
+>>>>>>> master
```
-
Completing the above step means that you've "sourced" the Markdown files from the filesystem. You can now "transform" the Markdown to HTML and the YAML frontmatter to JSON.
+<<<<<<< HEAD
## [](https://www.gatsbyjs.com/docs/how-to/routing/adding-markdown-pages/#transform-markdown-to-html-and-frontmatter-to-data-using-gatsby-transformer-remark)Transform Markdown to HTML and frontmatter to data using `gatsby-transformer-remark`
@@ -2447,9 +4209,16 @@ You'll use the plugin [`gatsby-transformer-remark`](https://www.gatsbyjs.com/plu
## [](https://www.gatsbyjs.com/docs/how-to/routing/adding-markdown-pages/#configure-plugin)Configure plugin
+=======
+[Transform Markdown to HTML and frontmatter to data using `gatsby-transformer-remark`](https://www.gatsbyjs.com/docs/how-to/routing/adding-markdown-pages/#transform-markdown-to-html-and-frontmatter-to-data-using-gatsby-transformer-remark)
+You'll use the plugin [`gatsby-transformer-remark`](https://www.gatsbyjs.com/plugins/gatsby-transformer-remark/) to recognize files which are Markdown and read their content. The plugin will convert the frontmatter metadata part of your Markdown files as `frontmatter` and the content part as HTML.
+[Install transformer plugin](https://www.gatsbyjs.com/docs/how-to/routing/adding-markdown-pages/#install-transformer-plugin)
+`npm install gatsby-transformer-remark`
+[Configure plugin](https://www.gatsbyjs.com/docs/how-to/routing/adding-markdown-pages/#configure-plugin)
+>>>>>>> master
Add this to `gatsby-config.js` after the previously added `gatsby-source-filesystem`.
-
```
+<<<<<<< HEAD
module.exports = { siteMetadata: { title: "My Gatsby Site", }, plugins: [ { resolve: `gatsby-source-filesystem`, options: { name: `markdown-pages`, path: `${__dirname}/src/markdown-pages`, }, }, `gatsby-transformer-remark`, ],}
```
@@ -2459,56 +4228,138 @@ Create a folder in the `/src` directory of your Gatsby application called `markd
## [](https://www.gatsbyjs.com/docs/how-to/routing/adding-markdown-pages/#frontmatter-for-metadata-in-markdown-files)Frontmatter for metadata in Markdown files
+=======
+module.exports = { siteMetadata: {
+ title: "My Gatsby Site", },
+plugins: [ {
+ resolve: `gatsby-source-filesystem`,
+options: {
+ name: `markdown-pages`,
+ path: `${__dirname}/src/markdown-pages`,
+},
+ },
+ `gatsby-transformer-remark`, ],
+}
+```
+[Add a Markdown file](https://www.gatsbyjs.com/docs/how-to/routing/adding-markdown-pages/#add-a-markdown-file)
+Create a folder in the `/src` directory of your Gatsby application called `markdown-pages`. Now create a Markdown file inside it with the name `post-1.md`.
+[Frontmatter for metadata in Markdown files](https://www.gatsbyjs.com/docs/how-to/routing/adding-markdown-pages/#frontmatter-for-metadata-in-markdown-files)
+>>>>>>> master
When you create a Markdown file, you can include a set of key/value pairs that can be used to provide additional data relevant to specific pages in the GraphQL data layer. This data is called "frontmatter" and is denoted by the triple dashes at the start and end of the block. This block will be parsed by `gatsby-transformer-remark` as YAML. You can then query the data through the GraphQL API from your React components.
-
src/markdown-pages/post-1.md
-
```
---slug: "/blog/my-first-post"date: "2019-05-04"title: "My first blog post"---
```
-
What is important in this step is the key pair `slug`. The value that is assigned to the key `slug` is used in order to navigate to your post.
+<<<<<<< HEAD
## [](https://www.gatsbyjs.com/docs/how-to/routing/adding-markdown-pages/#create-a-collection-route-for-the-markdown-files)Create a Collection Route for the Markdown files
+=======
+[](https://www.gatsbyjs.com/docs/how-to/routing/adding-markdown-pages/#create-a-collection-route-for-the-markdown-files)Create a Collection Route for the Markdown files
+>>>>>>> master
Create `src/pages/{MarkdownRemark.frontmatter__slug}.js` and add the following code:
-
src/pages/{MarkdownRemark.frontmatter\_\_slug}.js
-
```
+<<<<<<< HEAD
import React from "react"import { graphql } from "gatsby"export default function Template({ data, }) { const { markdownRemark } = data const { frontmatter, html } = markdownRemark return (
{frontmatter.title}
{frontmatter.date}
)}export const pageQuery = graphql` query($id: String!) { markdownRemark(id: { eq: $id }) { html frontmatter { date(formatString: "MMMM DD, YYYY") slug title } } }`
+=======
+import React from "react"
+import { graphql } from "gatsby"export default function Template({ data, }) { const { markdownRemark } = data const { frontmatter, html } = markdownRemark return (
{frontmatter.title}
{frontmatter.date}
)}export const pageQuery = graphql` query($id: String!) { markdownRemark(id: {
+ eq: $id }) { html frontmatter { date(formatString: "MMMM DD, YYYY") slug title } } }`
+>>>>>>> master
```
-
Two things are important in the file above:
-
1. A GraphQL query is made in the second half of the file to get the Markdown data. Gatsby has automagically given you all the Markdown metadata and HTML in this query's result.
-
**Note: To learn more about GraphQL, consider this [excellent resource](https://www.howtographql.com/)**
-
2. The result of the query is injected by Gatsby into the component as the `data` prop. `props.data.markdownRemark` is the property that has all the details of the Markdown file.
-
Next you could create a page component at `src/pages/blog/index.js` to serve as a listing page for all your blog posts.
-
This should get you started on some basic Markdown functionality in your Gatsby site. You can further customize the frontmatter and the component file to get desired effects!
-
For more information, have a look in the working example `using-markdown-pages`. You can find it in the [Gatsby examples section](https://github.com/gatsbyjs/gatsby/tree/master/examples).
+<<<<<<< HEAD
## [](https://www.gatsbyjs.com/docs/how-to/routing/adding-markdown-pages/#other-tutorials)Other tutorials
+=======
+[Other tutorials](https://www.gatsbyjs.com/docs/how-to/routing/adding-markdown-pages/#other-tutorials)
+>>>>>>> master
-
---
+<<<<<<< HEAD
# Technoloy
+=======
+### Overview
+The **`_.get()` method** in Lodash retrieves the object’s value at a specific path.
+If the value is not present at the object’s specific path, it will be resolved as `undefined`. This method will return the default value if specified in such a case.
+### Syntax
+```js
+_.get(object, path, defaultValue)
+```
+### Parameters
+This method accepts the following parameters:
+- **`object`**: The object in which the given path will be queried.
+- **`path`**: The path used to retrieve the value from the object.
+- **`defaultValue`**: The default value that will be returned for resolved values that are undefined.
+### Return value
+This method will return the value at the specified path if found. Otherwise, it will return the default value if specified.
+### Example
+Let’s look at an example of the `_.get()` method in the code snippet below:
+### Explanation
+In the HTML tab:
+- **Line 5**: We import the `lodash` script.
+In the JavaScript tab:
+- **Lines 2 to 15**: We create an object to perform a query.
+- **Line 18**: We define a variable `collegeYopPath` to get the value.
+- **Lines 19**: We use the `_.get()` method and pass the `object`, `collegeYopPath`, and a default value as parameters.
+- **Line 22**: We define a variable `falsyPath` to get the value.
+- **Lines 23**: We use the `_.get()` method and pass the `object`, `falsyPath` and a `default value` as parameters.
+### Output
+- The `_.get()` method at **line 19** contains a valid path, and therefore the expression is resolved, and `2021` is printed on the console.
+- The `_.get()` method at **Line 23** contains an invalid path, and therefore the expression is resolved as `undefined`.
+## Technoloy
+>>>>>>> master
![tech-stack](https://github.com/bgoonz/BGOONZ_BLOG_2.0/blob/master/static/images/madewith.png?raw=true)
-
---
+<<<<<<< HEAD
# SOURCECODE
+=======
+## SOURCECODE
+---
+### Overview
+The **`_.get()` method** in Lodash retrieves the object’s value at a specific path.
+If the value is not present at the object’s specific path, it will be resolved as `undefined`. This method will return the default value if specified in such a case.
+### Syntax
+```js
+_.get(object, path, defaultValue)
+```
+### Parameters
+This method accepts the following parameters:
+- **`object`**: The object in which the given path will be queried.
+- **`path`**: The path used to retrieve the value from the object.
+- **`defaultValue`**: The default value that will be returned for resolved values that are undefined.
+### Return value
+This method will return the value at the specified path if found. Otherwise, it will return the default value if specified.
+### Example
+Let’s look at an example of the `_.get()` method in the code snippet below:
+### Explanation
+In the HTML tab:
+- **Line 5**: We import the `lodash` script.
+In the JavaScript tab:
+- **Lines 2 to 15**: We create an object to perform a query.
+- **Line 18**: We define a variable `collegeYopPath` to get the value.
+- **Lines 19**: We use the `_.get()` method and pass the `object`, `collegeYopPath`, and a default value as parameters.
+- **Line 22**: We define a variable `falsyPath` to get the value.
+- **Lines 23**: We use the `_.get()` method and pass the `object`, `falsyPath` and a `default value` as parameters.
+### Output
+- The `_.get()` method at **line 19** contains a valid path, and therefore the expression is resolved, and `2021` is printed on the console.
+- The `_.get()` method at **Line 23** contains an invalid path, and therefore the expression is resolved as `undefined`.
+---
+>>>>>>> master
```
-
bryan@LAPTOP-9LGJ3JGS:/c/MY-WEB-DEV/BLOG____2.0/BLOG_2.0/src$ tree -f
.
├── ./components
@@ -2651,18 +4502,21 @@ bryan@LAPTOP-9LGJ3JGS:/c/MY-WEB-DEV/BLOG____2.0/BLOG_2.0/src$ tree -f
├── ./utils/toStyleObj.js
├── ./utils/toUrl.js
└── ./utils/withPrefix.js
-
21 directories, 119 files
bryan@LAPTOP-9LGJ3JGS:/c/MY-WEB-DEV/BLOG____2.0/BLOG_2.0/src$
```
-
---
+<<<<<<< HEAD
# Source Code
+=======
+## Source Code
+>>>>>>> master
- Folder Structure (src)
+
+ Folder Structure (src)
```
.
├── Combined_____-_____Doc.md
@@ -2969,17 +4823,21 @@ bryan@LAPTOP-9LGJ3JGS:/c/MY-WEB-DEV/BLOG____2.0/BLOG_2.0/src$
├── toStyleObj.js
├── toUrl.js
└── withPrefix.js
-
32 directories, 272 files
```
-
+
+
Click To See Component Sourcecode
+<<<<<<< HEAD
# Component Structure
+=======
+## Component Structure
+>>>>>>> master
```
.
├── ActionLink.js
@@ -3001,18 +4859,17 @@ bryan@LAPTOP-9LGJ3JGS:/c/MY-WEB-DEV/BLOG____2.0/BLOG_2.0/src$
├── Submenu.js
├── global.css
└── index.js
-
```
-
---
-
```js
import React from 'react';
import _ from 'lodash';
+<<<<<<< HEAD
+=======
+>>>>>>> master
import { Link, withPrefix, classNames } from '../utils';
import Icon from './Icon';
-
export default class ActionLink extends React.Component {
render() {
let action = _.get(this.props, 'action', null);
@@ -3031,7 +4888,7 @@ export default class ActionLink extends React.Component {
'button-icon': _.get(action, 'style', null) === 'icon'
})}
>
- {_.get(action, 'style', null) === 'icon' && _.get(action, 'icon_class', null) ? (
+ {_.get(action, 'style', null) === 'icon' &&_.get(action, 'icon_class', null) ? (
{_.get(action, 'label', null)}
@@ -3044,19 +4901,76 @@ export default class ActionLink extends React.Component {
}
}
```
-
---
+<<<<<<< HEAD
```js
import React from 'react';
import _ from 'lodash';
+=======
+### Table of Contents
+- [getPage][1]
+ - [Parameters][2]
+- [getPageByFilePath][3]
+ - [Parameters][4]
+- [getPages][5]
+ - [Parameters][6]
+ - [Examples][7]
+## getPage
+Get the page at the provided `urlPath`.
+### Parameters
+- `pages` **[Array][8]** Array of page objects. All pages must have 'url' field.
+- `urlPath` **[string][9]** The url path to find the page by
+Returns **[Object][10]**
+## getPageByFilePath
+Get the page at the provided `filePath`.
+### Parameters
+- `pages` **[Array][8]** Array of page objects. All pages must have 'url' field.
+- `filePath` **[string][9]** The file path to find the page by
+Returns **[Object][10]**
+## getPages
+Get all the pages located under the provided `urlPath`, not including the
+index page. I.e.: All pages having their URLs start with `urlPath` excluding
+the page having its URL equal to `urlPath`.
+### Parameters
+- `pages` **[Array][8]** Array of page objects. All pages must have 'url' field.
+- `urlPath` **[string][9]** The url path to filter pages by
+### Examples
+```javascript
+pages => [
+ {url: '/'},
+ {url: '/about'},
+ {url: '/posts'},
+ {url: '/posts/hello'},
+ {url: '/posts/world'}
+]
+getPages(pages, /posts')
+=> [
+ {url: '/posts/hello'},
+ {url: '/posts/world'}
+]
+```
+Returns **[Array][8]**
+[1]: #getpage
+[2]: #parameters
+[3]: #getpagebyfilepath
+[4]: #parameters-1
+[5]: #getpages
+[6]: #parameters-2
+[7]: #examples
+[8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array
+[9]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
+[10]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
+```js
+import React from 'react';
+import_ from 'lodash';
+>>>>>>> master
import { Link, withPrefix, classNames } from '../utils';
-
export default class CtaButtons extends React.Component {
render() {
let actions = _.get(this.props, 'actions', null);
- return _.map(actions, (action, action_idx) => (
+return_.map(actions, (action, action_idx) => (
{_.get(action, 'label', null)}
@@ -3077,20 +4991,21 @@ export default class CtaButtons extends React.Component {
}
}
```
-
---
-
```js
import React from 'react';
+<<<<<<< HEAD
import _ from 'lodash';
+=======
+import_ from 'lodash';
+>>>>>>> master
import { getPage, classNames, Link, withPrefix, pathJoin, getPages } from '../utils';
import DocsSubmenu from './DocsSubmenu';
-
export default class DocsMenu extends React.Component {
render() {
let site = _.get(this.props, 'site', null);
- let page = _.get(this.props, 'page', null);
+let page =_.get(this.props, 'page', null);
let root_docs_path = _.get(site, 'data.doc_sections.root_docs_path', null);
let root_page = getPage(this.props.pageContext.pages, root_docs_path);
return (
@@ -3104,7 +5019,7 @@ export default class DocsMenu extends React.Component {
{_.get(root_page, 'frontmatter.title', null)}
@@ -3113,9 +5028,9 @@ export default class DocsMenu extends React.Component {
let section_path = pathJoin(root_docs_path, section);
let section_page = getPage(this.props.pageContext.pages, section_path);
let child_pages = _.orderBy(getPages(this.props.pageContext.pages, section_path), 'frontmatter.weight');
- let child_count = _.size(child_pages);
+let child_count =_.size(child_pages);
let has_children = child_count > 0 ? true : false;
- let is_current_page = _.get(page, 'url', null) === _.get(section_page, 'url', null) ? true : false;
+ let is_current_page = _.get(page, 'url', null) ===_.get(section_page, 'url', null) ? true : false;
let is_active = _.get(page, 'url', null).startsWith(_.get(section_page, 'url', null));
return (
@@ -3149,18 +5064,19 @@ export default class DocsMenu extends React.Component {
}
}
```
-
---
-
```js
import React from 'react';
+<<<<<<< HEAD
import _ from 'lodash';
+=======
+import _from 'lodash';
+>>>>>>> master
import { classNames, Link, withPrefix } from '../utils';
-
export default class DocsSubmenu extends React.Component {
render() {
- let child_pages = _.get(this.props, 'child_pages', null);
+let child_pages =_.get(this.props, 'child_pages', null);
let page = _.get(this.props, 'page', null);
return (