Verified Commit 1edebfd5 authored by doshitan's avatar doshitan
Browse files

Minor page updates/formatting fixes

parent 753f5825
......@@ -3,7 +3,7 @@ title: Git Tips
toc: true
toc-margin: true
published: 2019-04-16T11:23:06-05:00
modified: 2020-10-14T22:50:25-04:00
modified: 2020-12-17T20:37:56-0500
---
I love git, it's such a good tool. Granted, it's the only VCS I've ever used in
......@@ -324,12 +324,13 @@ the [one idea is one
commit](https://secure.phabricator.com/book/phabflavor/article/recommendations_on_revision_control/)
approach.
Versions get tagged[^With an [annotated
tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging#_creating_tags), not a
lightweight one.], if fixes or features need backported, branch from the tag,
apply necessary changes and tag new release on that branch. If you don't do
"versions"/releases, but just regularly want to promote work to some "stable"
state, then have a `stable` branch that you update when appropriate.
Versions get tagged^[With an [annotated
tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging#_creating_tags),
preferably one that is signed, not a lightweight one.], if fixes or features
need backported, branch from the tag, apply necessary changes and tag new
release on that branch. If you don't do "versions"/releases, but just regularly
want to promote work to some "stable" state, then have a `stable` branch that
you update when appropriate.
Every commit that hits `master` should be "buildable"^[The definition of which
could vary based on the project.]. For the rare cases where there is some large
......@@ -460,9 +461,7 @@ also don't want showing up as untracked constantly, you can put them there.
# Checkout file from other branch
Sometimes you need to checkout current state of file from different branch.
It's just:
Sometimes you need to checkout current state of file from different branch. It's just:
```
git checkout <branch> -- <file path>
```
......
......@@ -3,7 +3,7 @@ title: Shell
toc: true
toc-margin: true
published: 2019-04-16T11:23:06-05:00
modified: 2019-08-21T08:27:38-04:00
modified: 2020-12-17T20:37:56-0500
---
I primarily use [[https://www.zsh.org/][Zsh]], though often must write code suitable for Bash for
......@@ -309,7 +309,7 @@ executable don't work.
#+END_SRC
Does not set the ~-e~ flag on the ~bash~ executable, ~env~ looks for an
executable with the literal name ~bash -x~ (which doesn't exist of course). Most
executable with the literal name ~bash -e~ (which doesn't exist of course). Most
programs that supporting running as an interpreter support a way set these
things in the script itself. For the above example, you could have your script
start like:
......@@ -361,11 +361,13 @@ Notes:
If you have a few scripts that could share some functionality, you can define
functions in a separate file, say ~lib.sh~ and source it in your other scripts
~source lib.sh~[fn::Or ~. lib.sh~] making the functions available there.
~source lib.sh~[fn:dot-source] making the functions available there.
[fn:dot-source] Can use ~.~ in as a shorthand for ~source~, like: ~. lib.sh~
* Scripting Scripts
Sometimes there are interactive programs (i.e., they prompt the user for input)
that you want to automate. The most basic situation being a command that prompts
for confirmation.
Sometimes there are interactive programs (i.e., they prompt for input) that you
want to automate. The most basic situation being a command that prompts for
confirmation.
If there's only one prompt:
......@@ -417,3 +419,4 @@ a no-op on occasion or a quick way to ignore the failure of a command
helpful or only something for masochists, try ~man bash~.
- https://github.com/jlevy/the-art-of-command-line
- https://awesome-shell.readthedocs.io/en/latest/README/
- https://shellhaters.org/
......@@ -3,7 +3,7 @@ title: Vegan Things
toc: true
toc-margin: true
published: 2018-12-30T17:05:31-06:00
modified: 2020-09-27T21:28:44-04:00
modified: 2020-12-17T20:37:56-0500
---
> Veganism is a way of living which seeks to exclude, as far as is possible and
......@@ -366,7 +366,7 @@ an "ethical vegan". In short, avoiding any exploitation of animals. Thankfully
this is a generally clear term, when someone says "vegan" that is what they
usually mean. Things go off the rails from here.
The term "vegetarian" is much more nebulous^[In it's original coining (at least
The term "vegetarian" is much more nebulous^[In its original coining (at least
mid-1800s), vegetarian generally meant the same as dietary vegan today, but in
[1944 some folks needed an easier term than "non-dairy vegetarians" to
distinguish their position][1944-vegan-term], giving birth to "vegan".] and
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment