rewrite introduction
This commit is contained in:
parent
d92631c795
commit
9621cfc26a
2
Makefile
2
Makefile
@ -37,7 +37,7 @@ default += db.rec
|
|||||||
default += .git/info/exclude
|
default += .git/info/exclude
|
||||||
|
|
||||||
.PHONY: database
|
.PHONY: database
|
||||||
database: $(default) ## Make a database for recfiles
|
database: $(default) ## Make a recfiles database
|
||||||
|
|
||||||
.PHONY: article
|
.PHONY: article
|
||||||
article: ## Write an article
|
article: ## Write an article
|
||||||
|
88
README.md
88
README.md
@ -4,72 +4,64 @@ title: "Linux Knowledge Base"
|
|||||||
|
|
||||||
The Linux Knowledge-Base provides quick-start guides for working with terminal programs.
|
The Linux Knowledge-Base provides quick-start guides for working with terminal programs.
|
||||||
|
|
||||||
|
# Setup
|
||||||
|
|
||||||
|
Install `make`, `recutils`, and any fuzzy-finder (i.e. `sk`, `fzy`, or `fzf`).
|
||||||
|
|
||||||
|
Usage: `make`
|
||||||
|
|
||||||
# Style
|
# Style
|
||||||
|
|
||||||
## Praxis Only
|
## No History, No Context
|
||||||
|
|
||||||
We leave theory alone as much as possible.
|
- Nobody cares about how the project started.
|
||||||
The documentation should be of the form 'if you want *X*, type *Y*'.
|
- Nobody wants to read what `ffmpeg` is, because anyone who wants to use it already knows what it is.
|
||||||
|
|
||||||
We don't need to explain what a program does - anyone looking up 'how to X', already knows what they want to do.
|
## Be Opinionated
|
||||||
We don't even need to explain which program to use - if someone wants to combine an mp4 and webm video into a single video file, they only care about that result, not about learning `ffmpeg`.
|
|
||||||
|
|
||||||
Any interest in these tools only comes after we can use them.
|
- Guides should not ask the reader to select options half-way through.
|
||||||
|
- Options for different filesystems, databases, et c., should be written as separate guides.
|
||||||
|
|
||||||
## Chronological
|
## Repetition Beats Reference
|
||||||
|
|
||||||
Entries should read like scripts - everything in the right order, with small notes on what this does.
|
If a database requires three commands to set up, it's better to repeat those three commands for every program that requires a database than to just link to another file which discusses databases.
|
||||||
|
|
||||||
The chronology should never branch.
|
## Show Arguments as Variables
|
||||||
If `gitea` can use three different types of database, the documentation should simply pick one and continue instructions from there.
|
|
||||||
Repetition works better than a reference - if a database requires three commands to set up, it's better to repeat those three commands for every program that requires a database than to just link to another file which discusses databases.
|
|
||||||
|
|
||||||
---
|
Look at this line:
|
||||||
|
|
||||||
### Closing
|
```sh
|
||||||
|
grep ls --color=always $HISTFILE | less -R
|
||||||
Introductory documents should show anything required to cleanly uninstall a program, without leaving bulky configuration files behind.
|
|
||||||
|
|
||||||
## Three Input Types
|
|
||||||
|
|
||||||
There are three types of examples:
|
|
||||||
|
|
||||||
Fixed input:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
ls
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Anything with arbitrary input should be shown as a variable.
|
What else can go in place of `always`?
|
||||||
|
Can you say `--color=red`?
|
||||||
|
Can you put anything?
|
||||||
|
The answer is not obvious.
|
||||||
|
|
||||||
```bash
|
What about this line:
|
||||||
ls $FILE
|
|
||||||
|
```sh
|
||||||
|
git branch new
|
||||||
|
git checkout new
|
||||||
```
|
```
|
||||||
|
|
||||||
Non-commands (e.g. output) should be shown as quoted text:
|
Do you always use `new`?
|
||||||
|
Can you use another word here?
|
||||||
|
The answer is not obvious.
|
||||||
|
|
||||||
> LK img
|
It's better to make all arbitrary values variables.
|
||||||
> Mail kn
|
|
||||||
> Projects music
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Example
|
|
||||||
|
|
||||||
```
|
|
||||||
How to see which websites you're actively accessing:
|
|
||||||
|
|
||||||
` ` `bash
|
|
||||||
ss -tr dst :$PORT
|
|
||||||
` ` `
|
|
||||||
|
|
||||||
> State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
|
|
||||||
> ESTAB 0 0 192.168.0.14:42476 149.154.167.91:https
|
|
||||||
> ESTAB 0 0 192.168.0.14:43644 104.17.90.199:https
|
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git branch $branch_name
|
||||||
|
git checkout $branch_name
|
||||||
|
PAGER='less -R'
|
||||||
|
grep ls --color=always $HISTFILE | $PAGER
|
||||||
```
|
```
|
||||||
|
|
||||||
# What's wrong with everything else?
|
Now we can see what can be changed.
|
||||||
|
|
||||||
|
# What's Wrong with Everything Else?
|
||||||
|
|
||||||
## Man pages
|
## Man pages
|
||||||
|
|
||||||
@ -79,7 +71,7 @@ ss -tr dst :$PORT
|
|||||||
- Zero respect for your time.
|
- Zero respect for your time.
|
||||||
- Often references `info` pages (yuck).
|
- Often references `info` pages (yuck).
|
||||||
|
|
||||||
## curl cheat.sh/
|
## `curl cheat.sh`
|
||||||
|
|
||||||
- Doesn't have the programs I like.
|
- Doesn't have the programs I like.
|
||||||
- Too short to get you started on many programs.
|
- Too short to get you started on many programs.
|
||||||
|
Loading…
Reference in New Issue
Block a user