diff --git a/Docs_For_AI_Unsorted/vault_prompt.md b/Docs_For_AI_Unsorted/vault_prompt.md new file mode 100644 index 0000000..29f16cd --- /dev/null +++ b/Docs_For_AI_Unsorted/vault_prompt.md @@ -0,0 +1,52 @@ +# Vault Prompt — When to capture knowledge + +## For Claude: how to handle vault moments + +At the end of any meaningful step or thread, ask: + +> "Should this go into the vault?" + +If yes — or if I say "vault time" — generate a copyable `.md` block in this format: + +--- + +## [Topic Title] + +### What we did +- (concrete steps taken) + +### Key distinction / Mental model +(the core insight in plain language — metaphor welcome) + +### Commands / syntax (if applicable) +| Command | What it does | +|---|---| +| `example` | explanation | + +### When to use this +(practical trigger: "do this when…") + +### Index line +`filename.md` — one-line summary for index.md + +--- + +## When to suggest the vault unprompted + +Suggest "should this go into the vault?" when: +- A confusing distinction got clarified (e.g. fetch vs pull) +- A hard-won lesson was learned (e.g. don't lock yourself out before testing SSH) +- A mental model clicked +- A recurring pattern was identified +- Something took a long time to debug and has a clean fix + +## When NOT to suggest it +- Pure task execution with no new insight +- Things already in the vault +- Very session-specific decisions with no reuse value + +## Vault file conventions +- One topic per file +- Structure: What we did → Key insight → Commands → When to use → Index line +- Filename: descriptive, lowercase, underscores (`git_basics.md`, `ssh_keys_and_agent.md`) +- Always update `index.md` with the index line after creating a new file \ No newline at end of file diff --git a/VS_code_tips.md b/VAULT/VS_code_tips.md similarity index 100% rename from VS_code_tips.md rename to VAULT/VS_code_tips.md diff --git a/VAULT/bash_fzf_setup.md b/VAULT/bash_fzf_setup.md new file mode 100644 index 0000000..728a456 --- /dev/null +++ b/VAULT/bash_fzf_setup.md @@ -0,0 +1,47 @@ +# Bash + fzf Setup (Fish-like UX without switching shells) + +## What was done +- Decided to stay on Bash instead of switching to Zsh or Fish +- Installed `fzf` and `bash-completion` via pacman (EndeavourOS) / apt (Debian VPS) +- Added activation block to `~/.bashrc` + +## Key insight +You don't need to switch shells to get Fish-like autocomplete and fuzzy history. `fzf` drops straight into Bash with zero compatibility risk — and Bash stays consistent across desktop and VPS. + +## The `.bashrc` block to add + +```bash +# bash-completion +[[ -r /usr/share/bash-completion/bash_completion ]] && . /usr/share/bash-completion/bash_completion + +# fzf +eval "$(fzf --bash)" +``` + +## Commands + +| What | Command | +|------|---------| +| Install (Arch/EndeavourOS) | `sudo pacman -S fzf bash-completion` | +| Install (Debian/VPS) | `sudo apt install fzf bash-completion` | +| Reload config | `source ~/.bashrc` | +| Fuzzy history search | `Ctrl+R` | +| Fuzzy file search | `Ctrl+T` | +| Fuzzy directory jump | `Alt+C` | +| Jump to line in nano | `Ctrl+_` then line number | +| Toggle line numbers in nano | `Alt+N` | + +## When to use +- Any time you set up a new Bash environment (VPS, new machine) +- Same config works on Arch and Debian — package manager is the only difference + +## Fixing a corrupted `.bashrc` +If a paste goes wrong and injects garbage into `.bashrc`: +1. `cat -n ~/.bashrc` to find the broken lines +2. `nano ~/.bashrc` → `Ctrl+_` to jump to line number, `Ctrl+W` to search +3. Remove the injected string carefully, leaving the rest of the line intact +4. Watch for `esac` keywords — they're easy to corrupt and hard to spot +5. `source ~/.bashrc` to verify the fix + +## Index line +`bash_fzf_setup.md` — Bash fuzzy search setup; fzf + bash-completion; fixing corrupted .bashrc diff --git a/VAULT/git_basics.md b/VAULT/git_basics.md new file mode 100644 index 0000000..936fc75 --- /dev/null +++ b/VAULT/git_basics.md @@ -0,0 +1,43 @@ +# Git Basics + +## git push — remote vs branch syntax + +**Problem:** `git push -u main` throws: +fatal: 'main' does not appear to be a git repository +fatal: Could not read from remote repository. + +**Diagnosis:** Git expected a remote name but got a branch name. + +**Fix:** +git push -u origin main + +**Key insight:** The syntax is always remote first, branch second. +`origin` = where to push (the remote repository) +`main` = which branch to push +`-u` = sets origin/main as the default tracking branch, +so future pushes only need `git push` + +## Git Basics — Vault Sync Workflow + +### What we set up +- Vault folder (`05_vault`) initialised as a Git repo on the desktop +- Remote added: `git@git.bujour.de:patsy/Vault.git` (Forgejo, port 2222) +- Pushed from desktop → Forgejo → pulled onto laptop +- Desktop clone deleted and re-cloned fresh from Forgejo (clean slate) + +### Day-to-day rhythm +- **Before starting:** `git pull origin main` — get what's on the remote +- **After changes:** `git add .` → `git commit -m "message"` → `git push origin main` + +### Key distinction +| Command | What it does | +|---|---| +| `git fetch` | Downloads new commits from remote — does NOT touch your files | +| `git pull` | fetch + applies changes to your working files | + +### Mental model +The remote (Forgejo) is the ocean. You push water out, you pull water back in. +One branch, working alone → pull before you start, push when you're done. + +### Index line +`git_basics.md` — day-to-day sync rhythm, fetch vs pull distinction \ No newline at end of file diff --git a/index.md b/VAULT/index.md similarity index 86% rename from index.md rename to VAULT/index.md index 11a8f3f..4c10bec 100644 --- a/index.md +++ b/VAULT/index.md @@ -6,3 +6,4 @@ - [ssh_keys_and_agent](ssh_keys_and_agent.md) - SSH keypair setup, config, agent, Forgejo auth - [VS Code Tips and Guide](VS_code_tips.md) - [git_basics](git_basics.md) — git push syntax, remote vs branch +- [Bash Basics -fsf - Fishlike use](bash_fzf_setup.md) \ No newline at end of file diff --git a/locale_and_system_language.md b/VAULT/locale_and_system_language.md similarity index 100% rename from locale_and_system_language.md rename to VAULT/locale_and_system_language.md diff --git a/ssh_keys_and_agent.md b/VAULT/ssh_keys_and_agent.md similarity index 100% rename from ssh_keys_and_agent.md rename to VAULT/ssh_keys_and_agent.md diff --git a/systemd_services.md b/VAULT/systemd_services.md similarity index 100% rename from systemd_services.md rename to VAULT/systemd_services.md diff --git a/git_basics.html b/git_basics.html new file mode 100644 index 0000000..5db52a9 --- /dev/null +++ b/git_basics.html @@ -0,0 +1,14 @@ +

Git Basics

+

git push — remote vs branch +syntax

+

Problem: git push -u main throws: +fatal: ‘main’ does not appear to be a git repository fatal: Could not +read from remote repository.

+

Diagnosis: Git expected a remote name but got a +branch name.

+

Fix: git push -u origin main

+

Key insight: The syntax is always remote first, +branch second. origin = where to push (the remote +repository) main = which branch to push -u = +sets origin/main as the default tracking branch, so future pushes only +need git push

diff --git a/git_basics.md b/git_basics.md deleted file mode 100644 index 15d108c..0000000 --- a/git_basics.md +++ /dev/null @@ -1,18 +0,0 @@ -# Git Basics - -## git push — remote vs branch syntax - -**Problem:** `git push -u main` throws: -fatal: 'main' does not appear to be a git repository -fatal: Could not read from remote repository. - -**Diagnosis:** Git expected a remote name but got a branch name. - -**Fix:** -git push -u origin main - -**Key insight:** The syntax is always remote first, branch second. -`origin` = where to push (the remote repository) -`main` = which branch to push -`-u` = sets origin/main as the default tracking branch, -so future pushes only need `git push` \ No newline at end of file diff --git a/git_basics_styled.html b/git_basics_styled.html new file mode 100644 index 0000000..44ce924 --- /dev/null +++ b/git_basics_styled.html @@ -0,0 +1,85 @@ + + + + + + + git_basics + + + + +

Git Basics

+

git push — remote vs branch +syntax

+

Problem: git push -u main throws: +fatal: ‘main’ does not appear to be a git repository fatal: Could not +read from remote repository.

+

Diagnosis: Git expected a remote name but got a +branch name.

+

Fix: git push -u origin main

+

Key insight: The syntax is always remote first, +branch second. origin = where to push (the remote +repository) main = which branch to push -u = +sets origin/main as the default tracking branch, so future pushes only +need git push

+ + diff --git a/styling.cs b/styling.cs new file mode 100644 index 0000000..e69de29 diff --git a/styling.css b/styling.css new file mode 100644 index 0000000..b24537d --- /dev/null +++ b/styling.css @@ -0,0 +1 @@ +@import url(//fonts.googleapis.com/css?family=Libre+Baskerville:400,400italic,700);@import url(//fonts.googleapis.com/css?family=Source+Code+Pro:400,400italic,700,700italic);/* normalize.css v3.0.0 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}body,code,tr.odd,tr.even,figure{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAMAAAAp4XiDAAABOFBMVEWDg4NycnJnZ2ebm5tjY2OgoKCurq5lZWWoqKiKiopmZmahoaGOjo5TU1N6enp7e3uRkZGJiYmFhYWxsbFOTk6Xl5eBgYGkpKRhYWFRUVGvr69dXV2wsLBiYmKnp6dUVFR5eXmdnZ1sbGxYWFh2dnZ0dHSmpqaZmZlVVVVqamqsrKyCgoJ3d3dubm5fX19tbW2ioqKSkpJWVlaHh4epqalSUlKTk5OVlZWysrJoaGhzc3N+fn5wcHBaWlqcnJxkZGRpaWlvb2+zs7NcXFxPT09/f3+lpaWWlpaQkJCjo6OIiIitra2enp6YmJhQUFBZWVmqqqqLi4uNjY1eXl6rq6ufn599f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cRqPC8RKdks7OV35txMGkdXzOkkhX9wTr+tIOGKZzjoo+qbWy3hsJJtz5D7nP+syyjxYe7eCAMIOywwFNfv/ZMNyBSxV0g7ZEJCPVE8IA5sw7jg9Kx3RXdfCQXGxpH+0kyHYpBj0H4y2VdAHRW9RyegOPPB+5NudysJji/lnxHQ9pFOMLMLeZ0O9hrnsuFsstbjczbC+14JHS+xsDf3pPgQXvUG6Q/H2fKV/B7jYX8RdOrug5BjG/1jueAPq1ElQb4AeH/sRNwnNyoFqsJwT9tWhChzL/IP/gxfleLSIgVQDdRvKBZVfu9wgKkeHEEfgIqa/F6fJ0HM8knJtkbCn4hKFvNDLWXDr8BGMywGD1Lh54AAAAASUVORK5CYII=")}body{font-family:"Libre Baskerville",Baskerville,Georgia,serif;background-color:#f8f8f8;color:#111;line-height:1.3;text-align:justify;-moz-hyphens:auto;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto}@media (max-width: 400px){body{font-size:12px;margin-left:10px;margin-right:10px;margin-top:10px;margin-bottom:15px}}@media (min-width: 401px) and (max-width: 600px){body{font-size:14px;margin-left:10px;margin-right:10px;margin-top:10px;margin-bottom:15px}}@media (min-width: 601px) and (max-width: 900px){body{font-size:15px;margin-left:100px;margin-right:100px;margin-top:20px;margin-bottom:25px}}@media (min-width: 901px) and (max-width: 1800px){body{font-size:17px;margin-left:200px;margin-right:200px;margin-top:30px;margin-bottom:25px;max-width:800px}}@media (min-width: 1801px){body{font-size:18px;margin-left:20%;margin-right:20%;margin-top:30px;margin-bottom:25px;max-width:1000px}}p{margin-top:10px;margin-bottom:18px}em{font-style:italic}strong{font-weight:bold}h1,h2,h3,h4,h5,h6{font-weight:bold;padding-top:0.25em;margin-bottom:0.15em}header{line-height:2.475em;padding-bottom:0.7em;border-bottom:1px solid #bbb;margin-bottom:1.2em}header>h1{border:none;padding:0;margin:0;font-size:225%}header>h2{border:none;padding:0;margin:0;font-style:normal;font-size:175%}header>h3{padding:0;margin:0;font-size:125%;font-style:italic}header+h1{border-top:none;padding-top:0px}h1{border-top:1px solid #bbb;padding-top:15px;font-size:150%;margin-bottom:10px}h1:first-of-type{border:none}h2{font-size:125%;font-style:italic}h3{font-size:105%;font-style:italic}hr{border:0px;border-top:1px solid #bbb;width:100%;height:0px}hr+h1{border-top:none;padding-top:0px}ul,ol{font-size:90%;margin-top:10px;margin-bottom:15px;padding-left:30px}ul{list-style:circle}ol{list-style:decimal}ul ul,ol ol,ul ol,ol ul{font-size:inherit}li{margin-top:5px;margin-bottom:7px}q,blockquote,dd{font-style:italic;font-size:90%}blockquote,dd{quotes:none;border-left:0.35em #bbb solid;padding-left:1.15em;margin:0 1.5em 0 0}blockquote blockquote,dd blockquote,blockquote dd,dd dd,ol blockquote,ol dd,ul blockquote,ul dd,blockquote ol,dd ol,blockquote ul,dd ul{font-size:inherit}a,a:link,a:visited,a:hover{color:inherit;text-decoration:none;border-bottom:1px dashed #111}a:hover,a:link:hover,a:visited:hover,a:hover:hover{border-bottom-style:solid}a.footnoteRef,a:link.footnoteRef,a:visited.footnoteRef,a:hover.footnoteRef{border-bottom:none;color:#666}code{font-family:"Source Code Pro","Consolas","Monaco",monospace;font-size:85%;background-color:#ddd;border:1px solid #bbb;padding:0px 0.15em 0px 0.15em;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}pre{margin-right:1.5em;display:block}pre>code{display:block;font-size:70%;padding:10px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;overflow-x:auto}blockquote pre,dd pre,ul pre,ol pre{margin-left:0;margin-right:0}blockquote pre>code,dd pre>code,ul pre>code,ol pre>code{font-size:77.77778%}caption,figcaption{font-size:80%;font-style:italic;text-align:right;margin-bottom:5px}caption:empty,figcaption:empty{display:none}table{width:100%;margin-top:1em;margin-bottom:1em}table+h1{border-top:none}tr td,tr th{padding:0.2em 0.7em}tr.header{border-top:1px solid #222;border-bottom:1px solid #222;font-weight:700}tr.odd{background-color:#eee}tr.even{background-color:#ccc}tbody:last-child{border-bottom:1px solid #222}dt{font-weight:700}dt:after{font-weight:normal;content:":"}dd{margin-bottom:10px}figure{margin:1.3em 0 1.3em 0;text-align:center;padding:0px;width:100%;background-color:#ddd;border:1px solid #bbb;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px;overflow:hidden}img{display:block;margin:0px auto;padding:0px;max-width:100%}figcaption{margin:5px 10px 5px 30px}.footnotes{color:#666;font-size:70%;font-style:italic}.footnotes li p:last-child a:last-child{border-bottom:none} diff --git a/syling.css b/syling.css new file mode 100644 index 0000000..e69de29