Skip to content

Commit

Permalink
Merge pull request #1879 from bgoonz/master
Browse files Browse the repository at this point in the history
  • Loading branch information
bgoonz authored Mar 31, 2022
2 parents 0db26e7 + 88faf88 commit efcc4be
Show file tree
Hide file tree
Showing 756 changed files with 61,726 additions and 69,548 deletions.
3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
GATSBY_ALGOLIA_APP_ID='BAGY237H21'
GATSBY_ALGOLIA_SEARCH_KEY='5f5a2d1bb109c79803ca95250ca3496c'
ALGOLIA_ADMIN_KEY='a618cbd2bff788d0f9d73b48867b99eb'
22 changes: 22 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@






















# Logs
logs
*.log
Expand Down Expand Up @@ -74,3 +95,4 @@ node_modules/
.package-lock.json
*.cache
*public
src/pages/docs/tools/Archive.md
20 changes: 8 additions & 12 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
{
"default": true,
"MD026/": false,
"MD026/":false,
"MD013": false,
"MD033": false,
"MD026": false,
"MD012": false,
"MD025": false,
"MD033/": false,
"MD02": false,
"MD024": false,
"MD030": false,
"MD022": false,
"MD001": false,
"MD003": false,
"MD033":false,
"MD02":false,
"MD024":false,
"MD030":false,
"MD022":false,
"MD001":false,
"MD003":false,
"MD029": false,
"MD007": { "indent": 4 },
"no-hard-tabs": false
Expand Down
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "engines" : { "node" : ">=0.14" } }
{ "engines" : { "node" : ">=0.15" } }
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v17.6.0
14.15.0
113 changes: 0 additions & 113 deletions Dockerfile

This file was deleted.

30 changes: 20 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,35 @@

---





<div align="center">

##### [Cloudfare-Backup](https://bgoonz-blog-2-0.pages.dev/)[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)[Gatsby Cloud Version](https://bgoonzblog20master.gatsbyjs.io/)

###### [⇨Privacy policy⇦](https://codepen.io/bgoonz/pen/LYLJZrW)
<https://testmysite.io/61e5ff836a840eeeef7e78e9/bgoonz-blog.netlify.app>
###### [⇨Privacy policy⇦](https://codepen.io/bgoonz/pen/LYLJZrW)



</div>
<div align="center">

[![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/webdevhub42/bgoonz_blog_2.0/badge)](https://www.codefactor.io/repository/github/webdevhub42/bgoonz_blog_2.0)[![CodeScene System Mastery**](https://codescene.io/projects/17026/status-badges/system-mastery)](https://codescene.io/projects/17026)![Profile views**](https://views.whatilearened.today/views/github/bgoonz/views.svg)[![Gitter**](https://badges.gitter.im/bgoonz/community.svg)](https://gitter.im/bgoonz/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)[![CodeScene Code Health](https://codescene.io/projects/17026/status-badges/code-health)](https://codescene.io/projects/17026)[![CodeQL](https://github.com/bgoonz/BGOONZ_BLOG_2.0/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/bgoonz/BGOONZ_BLOG_2.0/actions/workflows/codeql-analysis.yml)
[![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][![CodeFactor](https://www.codefactor.io/repository/github/bgoonz/bgoonz_blog_2.0/badge)](https://www.codefactor.io/repository/github/bgoonz/bgoonz_blog_2.0)(https://www.codefactor.io/repository/github/webdevhub42/bgoonz_blog_2.0)[![CodeScene System Mastery**](https://codescene.io/projects/17026/status-badges/system-mastery)](https://codescene.io/projects/17026)![Profile views**](https://views.whatilearened.today/views/github/bgoonz/views.svg)[![Gitter**](https://badges.gitter.im/bgoonz/community.svg)](https://gitter.im/bgoonz/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)[![CodeScene Code Health](https://codescene.io/projects/17026/status-badges/code-health)](https://codescene.io/projects/17026)[![CodeQL](https://github.com/bgoonz/BGOONZ_BLOG_2.0/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/bgoonz/BGOONZ_BLOG_2.0/actions/workflows/codeql-analysis.yml)

[![Run in Postman](https://run.pstmn.io/button.svg)](https://app.getpostman.com/run-collection/aac9892cd5e6fe8241ce?action=collection%2Fimport#?env%5Bblog%5D=dW5kZWZpbmVk)![GitHub visitors](https://visitor-badge-reloaded.herokuapp.com/badge?page_id=bgoonz.visitor.badge.reloaded&color=00bbbb&style=for-the-badge&logo=github)

---
---

![preview](https://github.com/bgoonz/BGOONZ_BLOG_2.0/blob/master/static/images/screencapture-bgoonz-blog-netlify-app-2022-01-20-23_58_59.png?raw=true)



---

<a href="https://testmysite.io/61e5ff836a840eeeef7e78e9/bgoonz-blog.netlify.app" rel="Test My Site Results">![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)</a>

</div>

<details>
Expand All @@ -37,7 +47,7 @@

## # Find

# To find files by case-insensitive extension (ex: .jpg, .JPG, .jpG)
# To find files by case-insensitive extension (ex: .jpg, .jpg, .jpG)

find . -iname "\*.jpg"

Expand Down Expand Up @@ -894,7 +904,7 @@ echo ' </style> '

echo "<ul> "

awk '{print "<iframe src=\""$1"\">","</iframe>"}' $listing
awk '{print "<iframe style="-webkit-transform:scale(0.7);-moz-transform-scale(0.7); src=\""$1"\">","</iframe>"}' $listing

# awk '{print "<li> "};

Expand Down Expand Up @@ -2290,7 +2300,7 @@ A quick look at the top-level files and directories you'll see in a Gatsby proje
Looking for more guidance? Full documentation for Gatsby lives [on the website](https://www.gatsbyjs.com/). Here are some places to start:

- **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.

## 💫 Deploy
Expand Down
9 changes: 8 additions & 1 deletion bash-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

<summary> Bash Cheat Sheet (MY COMMANDS) </summary
## 99. Cheat Sheet
### Description
Expand Down Expand Up @@ -541,10 +542,17 @@ printf "${Red} This is red \n"

```



</details>



>



#### Find

## To find files by case-insensitive extension (ex: .jpg, .JPG, .jpG)
Expand Down Expand Up @@ -1484,7 +1492,6 @@ git reset --hard origin/master
### Description: To remove a submodule you need to

> Notes:
---
> Delete the relevant section from the .gitmodules file.
> Stage the .gitmodules changes git add .gitmodules
Expand Down
4 changes: 0 additions & 4 deletions docs/content/DS_ALGO/algorithms/Conversions/ArbitraryBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,10 @@ const convertArbitraryBase = (stringInBaseOne, baseOneCharacters, baseTwoCharact
const baseTwoZero = baseTwoCharacters.charAt(0);
return stringInBaseTwo.replace(new RegExp(`^${baseTwoZero}+`), '');
};

export { convertArbitraryBase };

// > convertArbitraryBase('98', '0123456789', '01234567')
// '142'

// > convertArbitraryBase('98', '0123456789', 'abcdefgh')
// 'bec'

// > convertArbitraryBase('129', '0123456789', '01234567')
// '201'
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// About base64: https://en.wikipedia.org/wiki/Base64

/**
* Converts an array of bytes to base64 encoding
* @param {ArrayBuffer} binaryData An ArrayBuffer which represents an array of bytes
Expand All @@ -13,25 +12,20 @@ function bufferToBase64(binaryData) {
// Create an instance of Uint8Array, to read from the binaryData array buffer
const byteView = new Uint8Array(binaryData);
let result = '';

// Loop through all bytes in the buffer, in increments of 3 bytes
for (let i = 0; i < byteView.byteLength; i += 3) {
// Get the index for the next 4 base64 chars
const char1 = (byteView[i] & 252) >> 2;
const char2 = ((byteView[i] & 3) << 4) + ((byteView[i + 1] & 240) >> 4);
const char3 = ((byteView[i + 1] & 15) << 2) + ((byteView[i + 2] & 192) >> 6);
const char4 = byteView[i + 2] & 63;

result += base64Table[char1] + base64Table[char2] + base64Table[char3] + base64Table[char4];
}

// Add padding '=' chars if needed
if (padding !== 3) {
const paddedResult = result.slice(0, result.length - padding) + '='.repeat(padding);
return paddedResult;
}

return result;
}

export { bufferToBase64 };
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// About base64: https://en.wikipedia.org/wiki/Base64

/**
* Converts a base64 string to an array of bytes
* @param {string} b64 A base64 string
Expand All @@ -18,30 +17,24 @@ function base64ToBuffer(b64) {
const result = new ArrayBuffer(bufferLength);
// Create an instance of Uint8Array, to write to the `result` buffer
const byteView = new Uint8Array(result);

// Loop through all chars in the base64 string, in increments of 4 chars, and in increments of 3 bytes
for (let i = 0, j = 0; i < b64NoPadding.length; i += 4, j += 3) {
// Get the index of the next 4 base64 chars
const b64Char1 = base64Table.indexOf(b64NoPadding[i]);
const b64Char2 = base64Table.indexOf(b64NoPadding[i + 1]);
let b64Char3 = base64Table.indexOf(b64NoPadding[i + 2]);
let b64Char4 = base64Table.indexOf(b64NoPadding[i + 3]);

// If base64 chars 3 and 4 don't exit, then set them to 0
if (b64Char3 === -1) b64Char3 = 0;
if (b64Char4 === -1) b64Char4 = 0;

// Calculate the next 3 bytes
const byte1 = (b64Char1 << 2) + ((b64Char2 & 48) >> 4);
const byte2 = ((b64Char2 & 15) << 4) + ((b64Char3 & 60) >> 2);
const byte3 = ((b64Char3 & 3) << 6) + b64Char4;

byteView[j] = byte1;
byteView[j + 1] = byte2;
byteView[j + 2] = byte3;
}

return result;
}

export { base64ToBuffer };
Loading

0 comments on commit efcc4be

Please sign in to comment.