A lot of work on the presentation
The shell auto-image now runs code and turns the output into an image that is embedded into the document The prompt is configurable in /bin/prompt The first draft is done up until the references section
This commit is contained in:
parent
63c02e13f9
commit
22ef5f581d
15 changed files with 584 additions and 61 deletions
20
shell/first-cat-commit-file
Executable file
20
shell/first-cat-commit-file
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cd /tmp/demo
|
||||
|
||||
currentCommit="$(git rev-parse HEAD)"
|
||||
fileName="$(echo $currentCommit | sed 's/\(..\)/\1\//')"
|
||||
echo -e "\$ zlib-flate -uncompress < .git/objects/$fileName"
|
||||
zlib-flate -uncompress < ".git/objects/$fileName" | tr '\000' '␀'
|
||||
echo "\$ zlib-flate -uncompress < .git/objects/$fileName | sha1sum"
|
||||
echo -e "$currentCommit"
|
||||
|
||||
currentCommitTree="$(git cat-file -p $currentCommit | grep tree | cut -d' ' -f2)"
|
||||
echo "\$ git cat-file -p $(echo $currentCommitTree | grep -o '^.......') "
|
||||
git -c color.ui=always cat-file -p "$currentCommitTree"
|
||||
|
||||
aFile="$(git cat-file -p $currentCommitTree | grep blob | head -n 1 | cut -d' ' -f3 | cut -d' ' -f1)"
|
||||
echo "\$ git cat-file -p $(echo $aFile | grep -o '^.......') "
|
||||
git -c color.ui=always cat-file -p "$aFile"
|
||||
|
||||
|
5
shell/first-commit
Executable file
5
shell/first-commit
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cd /tmp/demo/
|
||||
echo '$ git commit'
|
||||
echo -e "Add greeting.py\n\nAdds the first file, currently always prints Hello" | git -c color.ui=always commit -F -
|
6
shell/first-diff
Executable file
6
shell/first-diff
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cd /tmp/demo
|
||||
sed -i 's/Hello/Hello World/' ./greeting.py
|
||||
echo '$ git diff'
|
||||
git -c color.ui=always diff
|
8
shell/git-init
Executable file
8
shell/git-init
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
rm -rf /tmp/demo/
|
||||
echo '$ mkdir /tmp/demo'
|
||||
mkdir -p /tmp/demo/
|
||||
echo '$ cd /tmp/demo'
|
||||
cd /tmp/demo/
|
||||
echo '$ git init'
|
||||
git -c colour.ui=always init
|
7
shell/log-with-decoration
Executable file
7
shell/log-with-decoration
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cd /tmp/demo/
|
||||
git config colour.ui always
|
||||
|
||||
echo '$ git log'
|
||||
git -c color.ui=always log --decorate=short
|
10
shell/second-commit-with-log
Executable file
10
shell/second-commit-with-log
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cd /tmp/demo/
|
||||
echo "$ git commit -m \"Change \\\"Hello\\\" to \\\"Hello World\\\"\""
|
||||
git add greeting.py
|
||||
git commit -m "Change \"Hello\" to \"Hello World\""
|
||||
echo "..."
|
||||
echo "$ git log"
|
||||
git -c color.ui=always log
|
||||
|
12
shell/show-staging-area
Executable file
12
shell/show-staging-area
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cd /tmp/demo
|
||||
echo '$ git status'
|
||||
git -c color.ui=always status
|
||||
echo '$ git add greeting.py'
|
||||
git add greeting.py
|
||||
echo '$ git status'
|
||||
git -c color.ui=always status
|
||||
|
||||
|
||||
|
11
shell/touch-git-status
Executable file
11
shell/touch-git-status
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
DIR="$(dirname "$(readlink -f "$0")")"
|
||||
cd /tmp/demo
|
||||
echo '$ touch greeting.py'
|
||||
cp "${DIR}/../code-examples/python-start.py" greeting.py
|
||||
echo '$ chmod +x !$'
|
||||
chmod +x greeting.py
|
||||
echo '$ vim greeting.py'
|
||||
echo '$ git status'
|
||||
git -c color.ui=always status
|
Loading…
Add table
Add a link
Reference in a new issue