Merge branch 'dev' into vhs

This commit is contained in:
2024-11-28 02:50:59 +01:00
11 changed files with 225 additions and 110 deletions

View File

@@ -92,7 +92,7 @@ A branch is a full copy of the project to test additional ideas.
You can make a new branch called 'featurez' like this:
```bash
git branch *featurez*
git branch $FEATURE_BRANCH
```
Have a look at all your branches:
@@ -104,19 +104,20 @@ git branch
Switch to your new branch:
```bash
git checkout *featurez*
git checkout $FEATURE_BRANCH
```
And if your changes are rubbish, checkout the "master" branch again, then delete "featurez":
```bash
git branch -D *featurez*
git branch -D $FEATURE_BRANCH
```
Or if it's a good branch, push it to the remote:
```bash
git push *origin* *featurez*
remote=origin
git push $remote $FEATURE_BRANCH
```
## Merging
@@ -124,13 +125,13 @@ git push *origin* *featurez*
Once you like the feature, merge it into the main branch. Switch to master then merge it:
```bash
git merge *featurez*
git merge $FEATURE_BRANCH
```
and delete `featurez` as you've already merged it:
And delete the branch, as you've already merged it:
```bash
git branch -d featurez
git branch -d $FEATURE_BRANCH
```
# Subtree
@@ -141,34 +142,6 @@ git branch -d featurez
git subtree add -P config git@gitlab.com:bindrpg/config.git master
```
## Pulling a Subtree from an existing git
The project has subdirectories sub-1,sub-2,sub-3. The first should be its own repository, but should also retain its own history.
First, we extract its history as an independent item, and make that into a seprate branch.
```bash
git subtree split --prefix=sub-1 -b sub
```
If you want something a few directories deep, you can use `--prefix=sub-1/dir-2/dir-3
Then go and create a new git somewhere else:
```bash
cd ..;mkdir sub-1;cd sub-1;git init --bare
```
Then go back to your initial git repo, and do the following:
git push ../subtest sub:master
Finally, you can clone this repo from your original.
```bash
git clone ../subtest
```
# Tricks
## Delete All History

9
data/git/git_secret.md Normal file
View File

@@ -0,0 +1,9 @@
---
title: "git secret"
tags: [ "data", "git" ]
---
This utility is largely useless, as it can only identify people by their email.
So if someone has multiple GPG keys associated with one email, the tool will not work.
Worse than not working, it may 'suddenly' stop working as you try to transfer a secret to someone, who then discovers that `git-secret` requires them to mess about with their GPG keyring in order to use the repository.

34
data/git/subtree.md Normal file
View File

@@ -0,0 +1,34 @@
---
title: "git"
tags: [ "Documentation", "data", "git", "subtree" ]
---
## Pulling a Subtree from an existing git
The project has subdirectories `sub-1`, `sub-2`, `sub-3`.
The first should be its own repository, but should also retain its own history.
First, we extract its history as an independent item, and make that into a seprate branch.
```bash
git subtree split --prefix=sub-1 -b sub
```
If you want something a few directories deep, you can use `--prefix=sub-1/dir-2/dir-3
Then go and create a new git somewhere else:
```bash
cd ..;mkdir sub-1;cd sub-1;git init --bare
```
Then go back to your initial git repo, and do the following:
git push ../subtest sub:master
Finally, you can clone this repo from your original.
```bash
git clone ../subtest
```

View File

@@ -1,10 +1,47 @@
---
title: "sc-im"
tags: [ "Documentation", "data" ]
tags: [ "Documentation", "TUI", "data" ]
---
# Edit
## Text
- [Sample file](sc-im/sample.sc)
# Basic Commands
## See Cells
Cells are hard to see.
Change this with `:set autowrap`.
Make `sc-im` always autowrap:
```bash
mkdir .config/sc-im/bash
echo 'set autowrap' >> .config/sc-im/scimrc
```
## Movement
| Command | Key |
|:------------------------------------|:---:|
| highest part | H |
| lowest part | L |
| top | gg |
| most right. | g$ |
| most left. | g0 |
| insert middle | \ |
| insert left | \> |
| insert right | < |
| to to cell b4 | gb4 |
| see all text in cells | aa |
| format cells so you can see it. | f |
| format wider right | fl |
| format smaller left | fh |
| format wider down | fj |
| format smaller down | fk |
## Edit
### Text
| Action | Key |
|:----------------------|:---:|
@@ -13,7 +50,7 @@ tags: [ "Documentation", "data" ]
| text (right align) | `|` |
| Edit existing text | E |
## Meta Actions
### Meta Actions
| Action | Key |
|:----------------------|:---:|
@@ -46,7 +83,7 @@ tags: [ "Documentation", "data" ]
| format smaller down | fk |
## Functions
### Functions
| Action | Key |
|:--------------------------------|:------------:|
@@ -56,7 +93,7 @@ tags: [ "Documentation", "data" ]
| minimumof those numbers | =@min(B1:B8) |
| multiply C1 to C8 | =@prod(C1:C8)|
## Visual
### Visual
| Action | Key |
|:--------------------------------|:------------:|

38
data/sc-im/sample.sc Normal file
View File

@@ -0,0 +1,38 @@
# This data file was generated by the Spreadsheet Calculator Improvised (sc-im)
# You almost certainly shouldn't edit it.
newsheet "Sheet1"
movetosheet "Sheet1"
offscr_sc_cols 0
offscr_sc_rows 0
nb_frozen_rows 1
nb_frozen_cols 0
nb_frozen_screenrows 2
nb_frozen_screencols 0
format A 14 1 0
format B 18 2 0
format 0 2
freeze 0
label A0 = "Food by Weight"
leftstring B0 = "No. Meals"
leftstring A1 = "Ajvar"
let A1 = 5
let B1 = A1*$A$10
leftstring A2 = "Apples"
let A2 = 3
let B2 = A2*$A$10
leftstring A3 = "Rocket"
let A3 = 0.2
let B3 = A3*$A$10
leftstring A4 = "Beli Cheese"
let A4 = 1
let B4 = A4*$A$10
leftstring A6 = "Total"
let A6 = @sum(A1:A4)
leftstring B6 = "Total"
let B6 = @sum(B1:B4)
leftstring A7 = "Average"
let A7 = @avg(A1:A4)
leftstring A10 = "Weight of Meal"
let A10 = 0.3
goto A0