diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index f0418c2b9..08769ae9f 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -5,7 +5,7 @@ "vscode": { "extensions": [ "mhutchie.git-graph", - "phil294.git-log--graph" + "philgh294.git-log--graph" ] } }, diff --git a/.devcontainer/github-sdks/Readme.md b/.devcontainer/github-sdks/Readme.md new file mode 100644 index 000000000..a74dd3865 --- /dev/null +++ b/.devcontainer/github-sdks/Readme.md @@ -0,0 +1,5 @@ +# List of features + +We can install the following features into our codespace enviornment + +https://containers.dev/features \ No newline at end of file diff --git a/.devcontainer/github-sdks/terraform/main.tf b/.devcontainer/github-sdks/terraform/main.tf new file mode 100644 index 000000000..84b2b9eaf --- /dev/null +++ b/.devcontainer/github-sdks/terraform/main.tf @@ -0,0 +1,17 @@ +terraform { + required_providers { + github = { + source = "integrations/github" + version = "6.11.1" + } + } +} + +provider "github" { + # Configuration options +} + +resource "github_branch" "development" { + repository = "Github-Examples" + branch = "sdks" +} \ No newline at end of file diff --git a/.devcontainer/ssh-keys/Readme.md b/.devcontainer/ssh-keys/Readme.md new file mode 100644 index 000000000..10a06e070 --- /dev/null +++ b/.devcontainer/ssh-keys/Readme.md @@ -0,0 +1,6 @@ + +``` +ssh-keygen -t ssh-ed25519 + +``` + diff --git a/.github/workflows/custom-action.yml b/.github/workflows/custom-action.yml index 7a87b53f1..717cf59fa 100644 --- a/.github/workflows/custom-action.yml +++ b/.github/workflows/custom-action.yml @@ -1,5 +1,8 @@ on: [push] +permissions: + contents: read + jobs: my-job: runs-on: ubuntu-latest diff --git a/git-crash-course/Readme.md b/git-crash-course/Readme.md index f96b960d6..179517ca7 100644 --- a/git-crash-course/Readme.md +++ b/git-crash-course/Readme.md @@ -21,7 +21,7 @@ git commit -m "add readme file" We can clone three ways: HTTPS, SSH, Github CLI -Since we are using GitHub Codespaecs we'll a create temporary directory in our workspace +Since we are using GitHub Codespaces we'll a create temporary directory in our workspace ```sh mkdir /workspace/tmp @@ -173,7 +173,7 @@ git add . git reset ``` -> git reset will revet a git add. +> git reset will revert a git add. ## Status diff --git a/git-crash-course/gitcrashcourse/Readme.md b/git-crash-course/gitcrashcourse/Readme.md new file mode 100644 index 000000000..dadbdf8a9 --- /dev/null +++ b/git-crash-course/gitcrashcourse/Readme.md @@ -0,0 +1,120 @@ +## Git Hidden Folder +There is a hidden folder called `.git` that tells you that our project is a git repo. + +If we wanted to create a git repo in a new project we'd create the new folder and then initialize the repo using `git init` + +```sh +mkdir /workspaces/tmp/new-project +cd /workspaces/tmp/new-project +git init +touch Readme.md +code Readme.md +git status +git add Readme.md +# make changes to Readme.md +git commit -m "add readme file" +``` + + +## Cloning +We can clone 3 ways: HTTPS, SSH, and Github CLI + +Since we are using Github codespaces, we will create a temporary directory in our workspace + +```sh + +mkdir /workspaces/tmp +cd /workspaces/tmp +``` + +## HTTPS + +```sh +git clone https://github.com/404CellPhoneRepair/Github-Examples.git + +cd Github-Examples +``` + + +## Commits + +When we want to commit code we can write git commit which will open up the commit edit message in the editor of choice +``` sh +git commit +``` +Set the Global editor + +``` +git config --global core.editor emacs +``` +Make a commit and commit message without opening an editor +```sh +git commit -m "Added another exclamation mark" +``` + +## Branches + + +## Remotes + + +## Stashing + + +## Merging + +When we want to stage changes that will be included in the commit +We can use the . to add all possible files. + +## Add +``` +git add Readme.md +git add . +``` + + +## Reset + +Reset allows you to move Staged changes back to being Unstaged. + +This is useful when you want to revert all files not to be commited. +``` +git add . +git reset +``` +> git reset will revert a git add . + +## Status + +Git status shows you what files will or will not be committed. + +``` +git status +``` +## Gitconfig file + +The gitcong file is what stores your global configurations for git such as email, phone number, name,editor and more. + +Showing the contents of our .gitconfig file +``` +git config --list --show-origin or git config --list +``` +When you first install git on a machine you are suppose to set up your name and email. + +```sh +git config --global user.name "John Doe" +git config --global user.email johndoe@example.com +``` + +## Log +git log will show recent commits to the git tree +``` +git logs +``` + +## Push +When we want to push a repo to our remote origin +``` +git push +``` + diff --git a/git-crash-course/hello b/git-crash-course/hello index 13a8cb87c..7a2aa6710 100644 --- a/git-crash-course/hello +++ b/git-crash-course/hello @@ -1 +1 @@ -Hello!!!! +Hello!!! diff --git a/github-sdks/js/package-lock.json b/github-sdks/js/package-lock.json index 6bdd29edd..e1faf4e26 100644 --- a/github-sdks/js/package-lock.json +++ b/github-sdks/js/package-lock.json @@ -10,8 +10,7 @@ "license": "ISC", "dependencies": { "octokit": "^3.1.2" - }, - "devDependencies": {} + } }, "node_modules/@octokit/app": { "version": "14.0.2", @@ -134,17 +133,33 @@ } }, "node_modules/@octokit/endpoint": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.4.tgz", - "integrity": "sha512-DWPLtr1Kz3tv8L0UvXTDP1fNwM0S+z6EJpRcvH66orY6Eld4XBMCSYsaWp4xIm61jTWxK68BrR7ibO+vSDnZqw==", + "version": "9.0.6", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.6.tgz", + "integrity": "sha512-H1fNTMA57HbkFESSt3Y9+FBICv+0jFceJFPWDePYlR/iMGrwM5ph+Dd4XRQs+8X+PUFURLQgX9ChPfhJ/1uNQw==", + "license": "MIT", "dependencies": { - "@octokit/types": "^12.0.0", + "@octokit/types": "^13.1.0", "universal-user-agent": "^6.0.0" }, "engines": { "node": ">= 18" } }, + "node_modules/@octokit/endpoint/node_modules/@octokit/openapi-types": { + "version": "24.2.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-24.2.0.tgz", + "integrity": "sha512-9sIH3nSUttelJSXUrmGzl7QUBFul0/mB8HRYl3fOlgHbIWG+WnYDXU3v/2zMtAvuzZ/ed00Ei6on975FhBfzrg==", + "license": "MIT" + }, + "node_modules/@octokit/endpoint/node_modules/@octokit/types": { + "version": "13.10.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.10.0.tgz", + "integrity": "sha512-ifLaO34EbbPj0Xgro4G5lP5asESjwHracYJvVaPIyXMuiuXLlhic3S47cBdTb+jfODkTE5YtGCLt3Ay3+J97sA==", + "license": "MIT", + "dependencies": { + "@octokit/openapi-types": "^24.2.0" + } + }, "node_modules/@octokit/graphql": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.0.2.tgz", @@ -200,9 +215,10 @@ } }, "node_modules/@octokit/openapi-types": { - "version": "19.1.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-19.1.0.tgz", - "integrity": "sha512-6G+ywGClliGQwRsjvqVYpklIfa7oRPA0vyhPQG/1Feh+B+wU0vGH1JiJ5T25d3g1JZYBHzR2qefLi9x8Gt+cpw==" + "version": "20.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz", + "integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA==", + "license": "MIT" }, "node_modules/@octokit/plugin-paginate-graphql": { "version": "4.0.0", @@ -216,17 +232,18 @@ } }, "node_modules/@octokit/plugin-paginate-rest": { - "version": "9.1.5", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.1.5.tgz", - "integrity": "sha512-WKTQXxK+bu49qzwv4qKbMMRXej1DU2gq017euWyKVudA6MldaSSQuxtz+vGbhxV4CjxpUxjZu6rM2wfc1FiWVg==", + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.2.2.tgz", + "integrity": "sha512-u3KYkGF7GcZnSD/3UP0S7K5XUFT2FkOQdcfXZGZQPGv3lm4F2Xbf71lvjldr8c1H3nNbF+33cLEkWYbokGWqiQ==", + "license": "MIT", "dependencies": { - "@octokit/types": "^12.4.0" + "@octokit/types": "^12.6.0" }, "engines": { "node": ">= 18" }, "peerDependencies": { - "@octokit/core": ">=5" + "@octokit/core": "5" } }, "node_modules/@octokit/plugin-rest-endpoint-methods": { @@ -275,13 +292,14 @@ } }, "node_modules/@octokit/request": { - "version": "8.1.6", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.1.6.tgz", - "integrity": "sha512-YhPaGml3ncZC1NfXpP3WZ7iliL1ap6tLkAp6MvbK2fTTPytzVUyUesBBogcdMm86uRYO5rHaM1xIWxigWZ17MQ==", - "dependencies": { - "@octokit/endpoint": "^9.0.0", - "@octokit/request-error": "^5.0.0", - "@octokit/types": "^12.0.0", + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.4.1.tgz", + "integrity": "sha512-qnB2+SY3hkCmBxZsR/MPCybNmbJe4KAlfWErXq+rBKkQJlbjdJeS85VI9r8UqeLYLvnAenU8Q1okM/0MBsAGXw==", + "license": "MIT", + "dependencies": { + "@octokit/endpoint": "^9.0.6", + "@octokit/request-error": "^5.1.1", + "@octokit/types": "^13.1.0", "universal-user-agent": "^6.0.0" }, "engines": { @@ -289,11 +307,12 @@ } }, "node_modules/@octokit/request-error": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.0.1.tgz", - "integrity": "sha512-X7pnyTMV7MgtGmiXBwmO6M5kIPrntOXdyKZLigNfQWSEQzVxR4a4vo49vJjTWX70mPndj8KhfT4Dx+2Ng3vnBQ==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.1.1.tgz", + "integrity": "sha512-v9iyEQJH6ZntoENr9/yXxjuezh4My67CBSu9r6Ve/05Iu5gNgnisNWOsoJHTP6k0Rr0+HQIpnH+kyammu90q/g==", + "license": "MIT", "dependencies": { - "@octokit/types": "^12.0.0", + "@octokit/types": "^13.1.0", "deprecation": "^2.0.0", "once": "^1.4.0" }, @@ -301,12 +320,43 @@ "node": ">= 18" } }, + "node_modules/@octokit/request-error/node_modules/@octokit/openapi-types": { + "version": "24.2.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-24.2.0.tgz", + "integrity": "sha512-9sIH3nSUttelJSXUrmGzl7QUBFul0/mB8HRYl3fOlgHbIWG+WnYDXU3v/2zMtAvuzZ/ed00Ei6on975FhBfzrg==", + "license": "MIT" + }, + "node_modules/@octokit/request-error/node_modules/@octokit/types": { + "version": "13.10.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.10.0.tgz", + "integrity": "sha512-ifLaO34EbbPj0Xgro4G5lP5asESjwHracYJvVaPIyXMuiuXLlhic3S47cBdTb+jfODkTE5YtGCLt3Ay3+J97sA==", + "license": "MIT", + "dependencies": { + "@octokit/openapi-types": "^24.2.0" + } + }, + "node_modules/@octokit/request/node_modules/@octokit/openapi-types": { + "version": "24.2.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-24.2.0.tgz", + "integrity": "sha512-9sIH3nSUttelJSXUrmGzl7QUBFul0/mB8HRYl3fOlgHbIWG+WnYDXU3v/2zMtAvuzZ/ed00Ei6on975FhBfzrg==", + "license": "MIT" + }, + "node_modules/@octokit/request/node_modules/@octokit/types": { + "version": "13.10.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.10.0.tgz", + "integrity": "sha512-ifLaO34EbbPj0Xgro4G5lP5asESjwHracYJvVaPIyXMuiuXLlhic3S47cBdTb+jfODkTE5YtGCLt3Ay3+J97sA==", + "license": "MIT", + "dependencies": { + "@octokit/openapi-types": "^24.2.0" + } + }, "node_modules/@octokit/types": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.4.0.tgz", - "integrity": "sha512-FLWs/AvZllw/AGVs+nJ+ELCDZZJk+kY0zMen118xhL2zD0s1etIUHm1odgjP7epxYU1ln7SZxEUWYop5bhsdgQ==", + "version": "12.6.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz", + "integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==", + "license": "MIT", "dependencies": { - "@octokit/openapi-types": "^19.1.0" + "@octokit/openapi-types": "^20.0.0" } }, "node_modules/@octokit/webhooks": { @@ -392,7 +442,8 @@ "node_modules/buffer-equal-constant-time": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", + "license": "BSD-3-Clause" }, "node_modules/clean-stack": { "version": "2.2.0", @@ -411,6 +462,7 @@ "version": "1.0.11", "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "license": "Apache-2.0", "dependencies": { "safe-buffer": "^5.0.1" } @@ -445,21 +497,23 @@ } }, "node_modules/jwa": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", - "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.2.tgz", + "integrity": "sha512-eeH5JO+21J78qMvTIDdBXidBd6nG2kZjg5Ohz/1fpa28Z4CcsWUzJ1ZZyFq/3z3N17aZy+ZuBoHljASbL1WfOw==", + "license": "MIT", "dependencies": { - "buffer-equal-constant-time": "1.0.1", + "buffer-equal-constant-time": "^1.0.1", "ecdsa-sig-formatter": "1.0.11", "safe-buffer": "^5.0.1" } }, "node_modules/jws": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", - "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.3.tgz", + "integrity": "sha512-byiJ0FLRdLdSVSReO/U4E7RoEyOCKnEnEPMjq3HxWtvzLsV08/i5RQKsFVNkCldrCaPr2vDNAOMsfs8T/Hze7g==", + "license": "MIT", "dependencies": { - "jwa": "^1.4.1", + "jwa": "^1.4.2", "safe-buffer": "^5.0.1" } }, @@ -556,7 +610,8 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/semver": { "version": "7.5.4", diff --git a/github-sdks/ruby/Gemfile.lock b/github-sdks/ruby/Gemfile.lock index b466fd11e..cf9460357 100644 --- a/github-sdks/ruby/Gemfile.lock +++ b/github-sdks/ruby/Gemfile.lock @@ -1,24 +1,28 @@ GEM remote: https://rubygems.org/ specs: - addressable (2.8.6) - public_suffix (>= 2.0.2, < 6.0) - faraday (2.9.0) - faraday-net_http (>= 2.0, < 3.2) - faraday-net_http (3.1.0) - net-http + addressable (2.9.0) + public_suffix (>= 2.0.2, < 8.0) + faraday (2.14.1) + faraday-net_http (>= 2.0, < 3.5) + json + logger + faraday-net_http (3.4.2) + net-http (~> 0.5) faraday-retry (2.2.0) faraday (~> 2.0) - net-http (0.4.1) - uri + json (2.19.2) + logger (1.7.0) + net-http (0.9.1) + uri (>= 0.11.1) octokit (8.0.0) faraday (>= 1, < 3) sawyer (~> 0.9) - public_suffix (5.0.4) + public_suffix (7.0.5) sawyer (0.9.2) addressable (>= 2.3.5) faraday (>= 0.17.3, < 3) - uri (0.13.0) + uri (1.1.1) PLATFORMS x86_64-linux diff --git a/markdown2/Readme.md b/markdown2/Readme.md new file mode 100644 index 000000000..57e9ca0ff --- /dev/null +++ b/markdown2/Readme.md @@ -0,0 +1,110 @@ +# Markdown Example + +- [unordered lists](#unordered-lists) +- ordered lists +- text formatting +- code +- tables +- [links](#links) +- images +- blockquotes +- autolists +- lists + +https://github.github.com/gfm/ + +## Unordered Lists +We can create unordered list in markdown using hyphens + +- foo +- bar ++ baz ++ baz + +## Ordered Lists + +1. foo + +2. bar +3) baz + +## Text Formatting + +_italics_ + +*italics* + +**bold** + +__bold__ + +~~strikethrough~~ + +## Code + +### Inline Code + +You can print to the terminal using the `puts "hello world"` command. + +### Multi-line Code + +### Without highlighting + +``` +def hello_world + puts "Hello World" +end +``` + +### With highlighting + +```rb +def hello_world + puts "Hello World" +end +``` +## Tables + +| foo | bar | +| --- | --- | +| baz | bim | + +| abc | defghi | +:-: | -----------: +bar | baz + +First|Second +-|- +1|2 +3|4 + +| abc | def | +| --- | --- | + +## Block Quotes + +> "The cloud is amazing" + + > # Foo + > bar + > baz + +## Links +Github website + +https://github.com + +Github CLI cheat sheet + +https://cli.github.com/manual/gh_issue_create + +Github Flavour Markdown + +https://github.github.com/gfm/ + +[Secret Page](/markdown/Secret.mdmarkdown/Secret.md) + +## Tasks Lists +- [ ] Item 1 +- [x] Item 2 +