diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml new file mode 100644 index 0000000..dfaf104 --- /dev/null +++ b/.github/workflows/links.yml @@ -0,0 +1,16 @@ +name: Check Links + +on: + schedule: + - cron: '0 8 * * 1' # every Monday at 08:00 UTC + workflow_dispatch: + +jobs: + link-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: lycheeverse/lychee-action@v2 + with: + args: --verbose --no-progress '**/*.md' + fail: true diff --git a/Documents/Docker.md b/Documents/Docker.md index 253f728..de75655 100644 --- a/Documents/Docker.md +++ b/Documents/Docker.md @@ -30,12 +30,11 @@ |`docker run -it --rm -p 3000:80 --name :` | create/start container, remove after stop (CTRL+C) | |`docker start ` | start docker container by ID | |`docker stop ` | stop docker container by ID | -|`docker stop ` | stop docker container by ID | |`docker rm ` | remove multiple docker containers by their IDs | |`CTRL+C` | stop running container in Terminal | |`docker ps` | display all running containers | |`docker ps -a` | display all running/not running containers with their status | -|`docker run -t : -f .\CreateTestDb.Dockerfile .` | build docker container from specific Dockerfile | +|`docker build -f .\CreateTestDb.Dockerfile -t : .` | build docker image from specific Dockerfile | |`docker exec -it /bin/sh` => `ls` | Open a command in running container and display content | |`docker exec -it /bin/bash` | Open a command in running container and display content | diff --git a/Documents/DotNet.md b/Documents/DotNet.md index 1cd4000..492227f 100644 --- a/Documents/DotNet.md +++ b/Documents/DotNet.md @@ -14,19 +14,19 @@ dotnet new sln -n [YourSolutionName] dotnet sln add [yourProjectName]\[yourProjectName].csproj ``` -### How to create a new class library project +### Howto create a new class library project ```bash dotnet new classlib -n [YourProjectName] ``` -### How to see installed dotnet sdks +### Howto see installed dotnet sdks ```bash dotnet --list-sdks ``` -### How to specify dotnet version with dotnet new +### Howto specify dotnet version with dotnet new ```bash dotnet new web -h @@ -57,7 +57,7 @@ dotnet new gitignore ## User Secrets -You can find the user secrets in following folder: `C:\Users\bartv\AppData\Roaming\Microsoft\UserSecrets` +You can find the user secrets in following folder: `%USERPROFILE%\AppData\Roaming\Microsoft\UserSecrets` ### Init diff --git a/Documents/Git.md b/Documents/Git.md index 946e8ca..333dd56 100644 --- a/Documents/Git.md +++ b/Documents/Git.md @@ -82,7 +82,7 @@ admin:repo_hook Full control of repository hooks ### Howto check contributions from a git repository -[Whodid]([https://](https://www.npmjs.com/package/whodid)) is a CLI contribution check tool that counts edited lines from all commits pro author +[Whodid](https://www.npmjs.com/package/whodid) is a CLI contribution check tool that counts edited lines from all commits pro author ```bash npm install -g whodid @@ -94,7 +94,7 @@ There's a neat NPM package that does it for you (and it should work cross-platfo Install it with: -```batch +```bash npm install -g git-removed-branches ``` @@ -102,19 +102,19 @@ And then git removed-branches will show you all the stale local branches, and gi * Run this command to see which branches will be deleted -```batch +```bash git removed-branches ``` * Run this command to actually delete these branches -```batch +```bash git removed-branches --prune ``` * Run this to actually delete these branches (forced) -```batch +```bash git removed-branches --prune --force ``` @@ -122,13 +122,13 @@ And then git removed-branches will show you all the stale local branches, and gi * Run this to see which branches will be deleted! -```batch +```bash git remote prune origin --dry-run ``` * Run this command to delete these branches -```batch +```bash git remote prune origin ``` @@ -137,7 +137,7 @@ And then git removed-branches will show you all the stale local branches, and gi ```csharp // KEEP CHANGES git reset HEAD~1 --soft - git log origin/master..HEAD` view unpushed git commits + git log origin/master..HEAD // view unpushed git commits ``` ### Howto uncommit last un-pushed git-commit DELETE CHANGES (~gN N=number of commits) @@ -190,6 +190,10 @@ hint: See the 'Note about fast-forwards' in 'git push --help' for details. `git push --force` +> **Prefer `--force-with-lease`** — it refuses to push if the remote has commits you haven't fetched, preventing accidental overwrite of a teammate's work. + +`git push --force-with-lease` + ### Howto handle fatal: refusing to merge unrelated histories `git pull origin --allow-unrelated-histories` @@ -248,7 +252,7 @@ hint: See the 'Note about fast-forwards' in 'git push --help' for details. ### Howto revert to a previous commit -`git reset --hard HEAD` +`git reset --hard HEAD` — discards uncommitted working tree changes, stays on the same commit ### Howto set your branch to exactly match the remote branch @@ -293,7 +297,7 @@ Esc ### Howto Delete the most recent commit, **destroying** the work you've done -`git reset --hard HEAD~1` +`git reset --hard HEAD~1` — moves back one commit; the commit and its changes are permanently gone ### Howto change a pushed commit message (not yet pulled from remote) @@ -304,6 +308,9 @@ After updating the message leave VIM editor by pressing ```csharp Esc :wq +``` + +```bash git push --force-with-lease ``` diff --git a/Documents/PowerShell.md b/Documents/PowerShell.md index ef5ebd0..6a0b20c 100644 --- a/Documents/PowerShell.md +++ b/Documents/PowerShell.md @@ -1,19 +1,19 @@ -## Powershell +## PowerShell ### Howto convert csv to JSON -```bash +```powershell $items = import-csv .\items.csv | ConvertTo-Json > items.json ``` ### Count the numbers of lines in a C# codebase -```bash +```powershell (gci -include *.cs,*.xaml -recurse | select-string .).Count ``` ### Export data from a table from (LocalDb)\MSSQLLocalDB to a file -```bash +```powershell bcp GrawSkyDevDb.dbo.InitSondeTable out "C:\CTemp\InitSondeTable.csv" -c -t -S "(localdb)\MSSQLLocalDB" -T ``` diff --git a/Documents/VsCode.md b/Documents/VsCode.md index 2b74260..c760d26 100644 --- a/Documents/VsCode.md +++ b/Documents/VsCode.md @@ -19,14 +19,14 @@ | `CTRL+/` | Split Editor | | `CTRL+` | Zoom in | | `CTRL+7` | Comment Line (toggle) | -| `CTRl+ALT+C` | Create New Git Branch (own Keyboard short cut) | +| `CTRL+ALT+C` | Create New Git Branch (own Keyboard short cut) | | `CTRL+ALT+L` | Reveal Active File in Explorer | | `CTRL+ALT+B` | Show/Hide GitHub Copilot Chat Window | | `CTRL+ALT+B+ENTER` | Hide GitHub Copilot Chat Window | | `CTRL+K, I` | GitHub Copilot Fix This | -| `CTRl+ALT+T` | Surround with ... (Surround Extension - Mehmet Yatkı) | +| `CTRL+ALT+T` | Surround with ... (Surround Extension - Mehmet Yatkı) | | `CTRL+ARROW LEFT/RIGHT` | Move to Next Word | -| `CTRl+B, CTRL+B` | Copy current branch name [install extension 'Copy name of current git branch' ] | +| `CTRL+B, CTRL+B` | Copy current branch name [install extension 'Copy name of current git branch' ] | | `CTRL+Q` | Show/Hide Terminal | | `CTRL+C,C` | Clear Console | | `CTRL+C` | Copy (no need to select line) | @@ -37,22 +37,22 @@ | `CTRL+J` | Toggle Bottom Panel Visibility | | `CTRL+K+C` or `CTRL+/` | Comment/Uncomment Line | | `CTRL+K+D` | Format Document | -| `CTRl+K+S` | Shows VsCode shortcuts | +| `CTRL+K+S` | Shows VsCode shortcuts | | `CTRL+K+W` | Close All Documents | | `CTRL+L` | Delete Line (no need to select line) | | `CTRL+M` | Go to Type Declaration | | `CTRL+N,N` | New File... | | `CTRL+P` | Go to File | | `CTRL+S` | Pin tab/Unpin tab | -| `CTRl+SHIFT+.` | Show methods, properties, fields of a TypeScript class | +| `CTRL+SHIFT+.` | Show methods, properties, fields of a TypeScript class | | `CTRL+SHIFT+D` | Focus Debugger | | `CTRL+SHIFT+E` | Toggle Solution Explorer (toggleSideBarVisibility) | | `CTRL+SHIFT+F` | Search in All Files | -| `CTRl+SHIFT+G` | Open Source Control Panel | +| `CTRL+SHIFT+G` | Open Source Control Panel | | `CTRL+SHIFT+H` | Search and Replace in All Files | | `CTRL+SHIFT+O` | Shows list of methods, properties, fields of active field | | `CTRL+SHIFT+ö` | Opens External Terminal in Project Root | -| `CTRl+SHIFT+P -> Balance (outward)` | Select a whole HTML tag | +| `CTRL+SHIFT+P -> Balance (outward)` | Select a whole HTML tag | | `CTRL+SHIFT+P` | Command Palette | | `CTRL+SHIFT+R` | Rename Symbol | | `CTRL+SHIFT+T` | Open New Terminal | @@ -81,17 +81,16 @@ | `Auto Self Close Tag` by Zeeshan Ahmad | Automatically removes the closing tag when entering a slash in the first | | `Auto Import` | Provides code actions and code completion for all available Typescript | | `Auto Rename Tag` | Renames the corresponding html tag | -| `C# Dev Kist` | C# Dev Kit enhances VsCode by adding a set of powerful tools and utilities | +| `C# Dev Kit` | C# Dev Kit enhances VsCode by adding a set of powerful tools and utilities | | `C# Extensions - JosKreativ` | C# IDE Extensions for VSCode | | `C#` | C# for Visual Studio Code (powered by OmniSharp) | | `Code Spell Checker` | Spelling Checker for Visual Studio Code | | `CodiumAI` | Integrity Agent powered by GPT3.5&4 | | `ColorTabs - Ore Poran` | Changes the active tab/status-bar/title-background | | `Copy name of current git branch` | Copy name of current git branch [do not forget to assign shortcut key] | -| `Error Lens - ALexander` | Improve highlighting of errors warnings and other language diagnostics | +| `Error Lens - Alexander` | Improve highlighting of errors warnings and other language diagnostics | | `ES7+ React/Redux/React-Native snippets` | ES7 Extension by dsznajder | | `GitHub Pull Requests` | Manage Your Pull Requests for a Repository from VSCode | -| `html tag wrapper` | Wrap selected html tags by pressing CTRL+i | | `Inline Fold - Mohammed Alamri` | A custom decorator that "fold" matching content in a single line | | `html tag Wrapper - hwencc` | wrap selected html tag by press ctrl+i, change the wrapper tag name too | | `Lorem Ipsum` | Generates and inserts lorem ipsum text into Visual Studio Code | @@ -181,7 +180,7 @@ ### ColorTabs settings in settings.json file -```bash +```json "colorTabs.config": [ { "regex": ".*", @@ -194,7 +193,7 @@ ### Prettier settings in settings.json file -```bash +```json "prettier.jsxSingleQuote": true, "prettier.bracketSameLine": true, "prettier.bracketSpacing": true, diff --git a/reports/code-audit-2026-06-30.md b/reports/code-audit-2026-06-30.md index 0aa43ed..11c8563 100644 --- a/reports/code-audit-2026-06-30.md +++ b/reports/code-audit-2026-06-30.md @@ -37,68 +37,68 @@ #### 🔴 High Priority -- `Documents/Git.md:85` — **Broken hyperlink.** The Whodid link is malformed: `[Whodid]([https://](https://www.npmjs.com/package/whodid))`. The `[https://]` prefix inside the link target breaks the URL and renders as a nested bracket expression on GitHub Pages. +- `Documents/Git.md:85` — **Broken hyperlink.** The Whodid link is malformed: `[Whodid]([https://](https://www.npmjs.com/package/whodid))`. The `[https://]` prefix inside the link target breaks the URL and renders as a nested bracket expression on GitHub Pages. ✅ Fixed 2026-06-30 - **Impact:** Readers clicking this link get a broken page. - **Recommendation:** Change to `[Whodid](https://www.npmjs.com/package/whodid)` - **Effort:** 2 minutes -- `Documents/Docker.md:33` — **Duplicate table row.** `docker stop ` appears twice (lines 32–33) with identical descriptions. +- `Documents/Docker.md:33` — **Duplicate table row.** `docker stop ` appears twice (lines 32–33) with identical descriptions. ✅ Fixed 2026-06-30 - **Impact:** Confusing redundancy; readers may assume there is a meaningful difference. - **Recommendation:** Delete the duplicate row. - **Effort:** 2 minutes -- `Documents/Docker.md:38` — **Incorrect command and description.** `docker run -t : -f .\CreateTestDb.Dockerfile .` is described as "build docker container from specific Dockerfile." The `-t` flag on `docker run` means *tag*, not Dockerfile specification. The correct command uses `docker build -f`. The syntax is also invalid (`-f` after the image name is not a valid `docker run` flag). +- `Documents/Docker.md:38` — **Incorrect command and description.** `docker run -t : -f .\CreateTestDb.Dockerfile .` is described as "build docker container from specific Dockerfile." ✅ Fixed 2026-06-30 The `-t` flag on `docker run` means *tag*, not Dockerfile specification. The correct command uses `docker build -f`. The syntax is also invalid (`-f` after the image name is not a valid `docker run` flag). - **Impact:** A developer following this command will get an error or unexpected behaviour. - **Recommendation:** Replace with: `docker build -f .\CreateTestDb.Dockerfile -t : .` - **Effort:** 5 minutes #### 🟡 Medium Priority -- `Documents/VsCode.md:22,27,29,40,47,51,55` — **`CTRl` capitalisation typos** (lowercase `l`) in 7 shortcut key rows: `CTRl+ALT+C`, `CTRl+ALT+T`, `CTRl+B, CTRL+B`, `CTRl+K+S`, `CTRl+SHIFT+.`, `CTRl+SHIFT+G`, `CTRl+SHIFT+P -> Balance (outward)`. +- `Documents/VsCode.md:22,27,29,40,47,51,55` — **`CTRl` capitalisation typos** (lowercase `l`) in 7 shortcut key rows: ✅ Fixed 2026-06-30 `CTRl+ALT+C`, `CTRl+ALT+T`, `CTRl+B, CTRL+B`, `CTRl+K+S`, `CTRl+SHIFT+.`, `CTRl+SHIFT+G`, `CTRl+SHIFT+P -> Balance (outward)`. - **Recommendation:** Change all occurrences to `CTRL` (uppercase L). - **Effort:** 5 minutes -- `Documents/VsCode.md:84` — **Typo in extension name.** `C# Dev Kist` should be `C# Dev Kit`. +- `Documents/VsCode.md:84` — **Typo in extension name.** `C# Dev Kist` should be `C# Dev Kit`. ✅ Fixed 2026-06-30 - **Impact:** Readers searching for this extension by name will not find it. - **Effort:** 1 minute -- `Documents/VsCode.md:91` — **Mid-word capitalisation in author name.** `Error Lens - ALexander` has a rogue capital (`ALexander`). +- `Documents/VsCode.md:91` — **Mid-word capitalisation in author name.** `Error Lens - ALexander` has a rogue capital (`ALexander`). ✅ Fixed 2026-06-30 - **Recommendation:** Change to `Error Lens - Alexander`. - **Effort:** 1 minute -- `Documents/VsCode.md:94–96` — **Possible duplicate extension entries.** Both `html tag wrapper` (line 94) and `html tag Wrapper - hwencc` (line 96) appear to be the same extension listed twice; `-hwencc` is the author's marketplace ID. +- `Documents/VsCode.md:94–96` — **Possible duplicate extension entries.** Both `html tag wrapper` (line 94) and `html tag Wrapper - hwencc` (line 96) appear to be the same extension listed twice; `-hwencc` is the author's marketplace ID. ✅ Fixed 2026-06-30 - **Impact:** Redundant entries bloat the table and may confuse readers. - **Recommendation:** Verify whether these are distinct extensions; if the same, keep the `hwencc` entry (more specific) and remove the generic one. - **Effort:** 5 minutes -- `Documents/VsCode.md:184,197` — **Wrong code fence language for JSON content.** The `ColorTabs settings` block (line 184) and `Prettier settings` block (line 197) use ` ```bash ` fences but contain JSON configuration snippets. This disables JSON syntax highlighting. +- `Documents/VsCode.md:184,197` — **Wrong code fence language for JSON content.** The `ColorTabs settings` block (line 184) and `Prettier settings` block (line 197) use ` ```bash ` fences but contain JSON configuration snippets. This disables JSON syntax highlighting. ✅ Fixed 2026-06-30 - **Recommendation:** Change both fence labels from `bash` to `json`. - **Effort:** 2 minutes -- `Documents/Git.md:140` — **Stray backtick leaking out of inline code.** The line reads: `` git log origin/master..HEAD` view unpushed git commits `` — the closing backtick ends the code span mid-line, leaving "view unpushed git commits" as stray text. +- `Documents/Git.md:140` — **Stray backtick leaking out of inline code.** The line reads: `` git log origin/master..HEAD` view unpushed git commits `` — the closing backtick ends the code span mid-line, leaving "view unpushed git commits" as stray text. ✅ Fixed 2026-06-30 - **Recommendation:** Restructure to: `` `git log origin/master..HEAD` — view unpushed git commits `` - **Effort:** 2 minutes -- `Documents/DotNet.md:60` — **Machine-specific hardcoded username.** The text reads `C:\Users\bartv\AppData\Roaming\Microsoft\UserSecrets` — `bartv` is specific to one machine. +- `Documents/DotNet.md:60` — **Machine-specific hardcoded username.** The text reads `C:\Users\bartv\AppData\Roaming\Microsoft\UserSecrets` — `bartv` is specific to one machine. ✅ Fixed 2026-06-30 - **Impact:** Readers on other machines will follow an incorrect path. - **Recommendation:** Replace with `%USERPROFILE%\AppData\Roaming\Microsoft\UserSecrets` - **Effort:** 2 minutes -- `Documents/DotNet.md:17,23,29` — **Heading style inconsistency.** Three headings use `### How to ...` (two words) while the repo-wide convention is `### Howto ...` (one word). +- `Documents/DotNet.md:17,23,29` — **Heading style inconsistency.** Three headings use `### How to ...` (two words) while the repo-wide convention is `### Howto ...` (one word). ✅ Fixed 2026-06-30 - **Recommendation:** Normalise to `### Howto ...` - **Effort:** 5 minutes #### 🟢 Low Priority / Observations -- `Documents/Git.md:249,294` — Near-duplicate sections on reverting commits (`git reset --hard HEAD` vs `git reset --hard HEAD~1`). The distinction is meaningful but easy to miss. Add a one-liner clarifying `HEAD` vs `HEAD~1`. +- `Documents/Git.md:249,294` — Near-duplicate sections on reverting commits (`git reset --hard HEAD` vs `git reset --hard HEAD~1`). The distinction is meaningful but easy to miss. Add a one-liner clarifying `HEAD` vs `HEAD~1`. ✅ Fixed 2026-06-30 -- `Documents/Git.md:279,298` — Near-duplicate sections on amending commit messages (un-pushed vs pushed). The pushed variant correctly adds `git push --force-with-lease`, but that command is erroneously placed inside the VIM `:wq` code block. Extract it to its own block after the VIM instructions. +- `Documents/Git.md:279,298` — Near-duplicate sections on amending commit messages (un-pushed vs pushed). The pushed variant correctly adds `git push --force-with-lease`, but that command is erroneously placed inside the VIM `:wq` code block. Extract it to its own block after the VIM instructions. ✅ Fixed 2026-06-30 -- `Documents/Git.md:97,105,110,115,125,129` — Non-standard ` ```batch ` fence label used in several blocks. GitHub Pages renders `batch` as plain text without syntax highlighting. Change to `bash` or `cmd`. +- `Documents/Git.md:97,105,110,115,125,129` — Non-standard ` ```batch ` fence label used in several blocks. GitHub Pages renders `batch` as plain text without syntax highlighting. Change to `bash` or `cmd`. ✅ Fixed 2026-06-30 -- `Documents/Git.md:191` — `git push --force` recommended as a solution with no caveat. Add a note recommending `git push --force-with-lease` instead, which is safer. +- `Documents/Git.md:191` — `git push --force` recommended as a solution with no caveat. Add a note recommending `git push --force-with-lease` instead, which is safer. ✅ Fixed 2026-06-30 -- `Documents/PowerShell.md:1` — Heading reads `## Powershell` — should be `## PowerShell` (capital S), consistent with README and Microsoft branding. +- `Documents/PowerShell.md:1` — Heading reads `## Powershell` — should be `## PowerShell` (capital S), consistent with README and Microsoft branding. ✅ Fixed 2026-06-30 --- @@ -117,7 +117,7 @@ ### 5. Testing - A `validate.yml` GitHub Actions workflow exists (badge shown in README). The badge was green at the time of audit, indicating the workflow is active. -- No automated broken-link detection was found. Given the broken link at `Git.md:85`, adding a link-checker step to the validate workflow would be a worthwhile low-cost improvement. +- No automated broken-link detection was found. Given the broken link at `Git.md:85`, adding a link-checker step to the validate workflow would be a worthwhile low-cost improvement. ✅ Fixed 2026-06-30 - **Recommendation:** Add `lychee-action` or `markdown-link-check` to the validate workflow. - **Effort:** 30 minutes @@ -127,11 +127,11 @@ #### 🟡 Medium Priority -- `Documents/PowerShell.md` — **Stub file with only 3 entries.** PowerShell is a primary tool for Windows/.NET developers (the stated audience), yet this is the thinnest file in the repo. +- `Documents/PowerShell.md` — **Stub file with only 3 entries.** PowerShell is a primary tool for Windows/.NET developers (the stated audience), yet this is the thinnest file in the repo. ⏭ Won't fix - **Recommendation:** Expand with common PowerShell patterns relevant to the .NET/Windows workflow. - **Effort:** 1–2 hours -- `Documents/PowerShell.md:7,13,19` — **PowerShell code blocks use `bash` fence.** Change to `powershell` for correct syntax highlighting. +- `Documents/PowerShell.md:7,13,19` — **PowerShell code blocks use `bash` fence.** Change to `powershell` for correct syntax highlighting. ✅ Fixed 2026-06-30 - **Effort:** 2 minutes #### 🟢 Low Priority / Observations