%%script bash

# Dependency Variables, set to match your project directories

cat <<EOF > /tmp/variables.sh
export project_dir=$HOME/vscode  # change vscode to different name to test git clone
export project=\$project_dir/teacher  # change teacher to name of project from git clone
export project_repo="https://github.com/nighthawkcoders/teacher.git"  # change to project of choice
EOF
%%script bash

# Extract saved variables
source /tmp/variables.sh

# Output shown title and value variables
echo "Project dir: $project_dir"
echo "Project: $project"
echo "Repo: $project_repo"
Project dir: /home/kaiden_do/vscode
Project: /home/kaiden_do/vscode/teacher
Repo: https://github.com/nighthawkcoders/teacher.git

%%script bash

# Extract saved variables
source /tmp/variables.sh

echo "Using conditional statement to create a project directory and project"

cd ~    # start in home directory

# Conditional block to make a project directory
if [ ! -d $project_dir ]
then 
    echo "Directory $project_dir does not exists... makinng directory $project_dir"
    mkdir -p $project_dir
fi
echo "Directory $project_dir exists." 

# Conditional block to git clone a project from project_repo
if [ ! -d $project ]
then
    echo "Directory $project does not exists... cloning $project_repo"
    cd $project_dir
    git clone $project_repo
    cd ~
fi
echo "Directory $project exists." 
Using conditional statement to create a project directory and project
Directory /home/kaiden_do/vscode exists.
Directory /home/kaiden_do/vscode/teacher exists.
%%script bash

# Extract saved variables
source /tmp/variables.sh

echo "Navigate to project, then navigate to area wwhere files were cloned"
cd $project
pwd

echo ""
echo "list top level or root of files with project pulled from github"
ls
Navigate to project, then navigate to area wwhere files were cloned
/home/kaiden_do/vscode/teacher

list top level or root of files with project pulled from github
Gemfile
LICENSE
Makefile
README.md
_config.yml
_data
_includes
_layouts
_notebooks
_posts
assets
csa.md
csp.md
csse.md
images
index.md
indexBlogs.md
scripts
%%script bash

# Extract saved variables
source /tmp/variables.sh

echo "Navigate to project, then navigate to area wwhere files were cloned"
cd $project
pwd

echo ""
echo "list all files in long format"
ls -al   # all files -a (hidden) in -l long listing
Navigate to project, then navigate to area wwhere files were cloned
/home/kaiden_do/vscode/teacher

list all files in long format
total 100
drwxr-xr-x 12 kaiden_do kaiden_do 4096 Aug 21 11:27 .
drwxr-xr-x 19 kaiden_do kaiden_do 4096 Aug 22 10:15 ..
drwxr-xr-x  8 kaiden_do kaiden_do 4096 Aug 22 23:49 .git
drwxr-xr-x  3 kaiden_do kaiden_do 4096 Aug 21 11:27 .github
-rw-r--r--  1 kaiden_do kaiden_do  163 Aug 21 11:27 .gitignore
-rw-r--r--  1 kaiden_do kaiden_do  128 Aug 21 11:27 Gemfile
-rw-r--r--  1 kaiden_do kaiden_do 1102 Aug 21 11:27 LICENSE
-rw-r--r--  1 kaiden_do kaiden_do 3220 Aug 21 11:27 Makefile
-rw-r--r--  1 kaiden_do kaiden_do 6960 Aug 21 11:27 README.md
-rw-r--r--  1 kaiden_do kaiden_do  628 Aug 21 11:27 _config.yml
drwxr-xr-x  2 kaiden_do kaiden_do 4096 Aug 21 11:27 _data
drwxr-xr-x  2 kaiden_do kaiden_do 4096 Aug 21 11:27 _includes
drwxr-xr-x  2 kaiden_do kaiden_do 4096 Aug 21 11:27 _layouts
drwxr-xr-x  3 kaiden_do kaiden_do 4096 Aug 21 11:27 _notebooks
drwxr-xr-x  2 kaiden_do kaiden_do 4096 Aug 21 11:27 _posts
drwxr-xr-x  4 kaiden_do kaiden_do 4096 Aug 21 11:27 assets
-rw-r--r--  1 kaiden_do kaiden_do   98 Aug 21 11:27 csa.md
-rw-r--r--  1 kaiden_do kaiden_do  104 Aug 21 11:27 csp.md
-rw-r--r--  1 kaiden_do kaiden_do  114 Aug 21 11:27 csse.md
drwxr-xr-x  2 kaiden_do kaiden_do 4096 Aug 21 11:27 images
-rw-r--r--  1 kaiden_do kaiden_do 5196 Aug 21 11:27 index.md
-rw-r--r--  1 kaiden_do kaiden_do   58 Aug 21 11:27 indexBlogs.md
drwxr-xr-x  2 kaiden_do kaiden_do 4096 Aug 21 11:27 scripts
%%script bash

# Extract saved variables
source /tmp/variables.sh

echo "Look for posts"
export posts=$project/_posts  # _posts inside project
cd $posts  # this should exist per fastpages
pwd  # present working directory
ls -l  # list posts
Look for posts
/home/kaiden_do/vscode/teacher/_posts
total 88
-rw-r--r-- 1 kaiden_do kaiden_do  7731 Aug 21 11:27 2023-08-16-Tools_Equipment.md
-rw-r--r-- 1 kaiden_do kaiden_do  4694 Aug 21 11:27 2023-08-16-pair_programming.md
-rw-r--r-- 1 kaiden_do kaiden_do  7228 Aug 21 11:27 2023-08-17-markdown-html_fragments.md
-rw-r--r-- 1 kaiden_do kaiden_do  6880 Aug 21 11:27 2023-08-23-javascript-calculator.md
-rw-r--r-- 1 kaiden_do kaiden_do 10793 Aug 21 11:27 2023-08-30-agile_methodolgy.md
-rw-r--r-- 1 kaiden_do kaiden_do  3977 Aug 21 11:27 2023-08-30-javascript-music-api.md
-rw-r--r-- 1 kaiden_do kaiden_do  5498 Aug 21 11:27 2023-09-06-javascript-motion-mario-oop.md
-rw-r--r-- 1 kaiden_do kaiden_do  4878 Aug 21 11:27 2023-09-13-java-free_response.md
-rw-r--r-- 1 kaiden_do kaiden_do 13481 Aug 21 11:27 2023-10-16-java-api-pojo-jpa.md
-rw-r--r-- 1 kaiden_do kaiden_do  6887 Aug 21 11:27 2023-11-13-jwt-java-spring.md
%%script bash

# Extract saved variables
source /tmp/variables.sh

echo "Look for notebooks"
export notebooks=$project/_notebooks  # _notebooks is inside project
cd $notebooks   # this should exist per fastpages
pwd  # present working directory
ls -l  # list notebooks
Look for notebooks
/home/kaiden_do/vscode/teacher/_notebooks
total 756
-rw-r--r-- 1 kaiden_do kaiden_do  13363 Aug 21 11:27 2023-08-01-cloud_database.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do   9263 Aug 21 11:27 2023-08-01-mario_player.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do  44522 Aug 21 11:27 2023-08-02-cloud-workspace-automation.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do  22640 Aug 21 11:27 2023-08-03-mario_block.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do  12147 Aug 21 11:27 2023-08-03-mario_platform.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do  19964 Aug 21 11:27 2023-08-03-mario_tube.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do  25031 Aug 21 11:27 2023-08-04-mario_background.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do   3571 Aug 21 11:27 2023-08-07-mario_lesson.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do  10316 Aug 21 11:27 2023-08-15-java-hello.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do  26197 Aug 21 11:27 2023-08-16-github_pages_setup.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do  16648 Aug 21 11:27 2023-08-16-linux_shell.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do  11693 Aug 21 11:27 2023-08-16-python_hello.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do   9605 Aug 21 11:27 2023-08-23-github_pages_anatomy.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do  23106 Aug 21 11:27 2023-08-23-java-console_games.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do   9296 Aug 21 11:27 2023-08-23-python_tricks.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do  10312 Aug 21 11:27 2023-08-30-javascript_top_10.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do   9783 Aug 21 11:27 2023-08-30-showcase-S1-pair.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do   7357 Aug 21 11:27 2023-09-05-python-flask-anatomy.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do  22677 Aug 21 11:27 2023-09-06-AWS-deployment.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do  14695 Aug 21 11:27 2023-09-06-java-primitives.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do  11964 Aug 21 11:27 2023-09-06-javascript-input.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do  14011 Aug 21 11:27 2023-09-12-java_menu_class.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do   9828 Aug 21 11:27 2023-09-13-java_fibonaccii_class.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do  45105 Aug 21 11:27 2023-09-13-javascript_output.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do  44726 Aug 21 11:27 2023-09-13-python-pandas_intro.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do  11884 Aug 21 11:27 2023-09-20-java-image_2D.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do  27403 Aug 21 11:27 2023-09-20-javascript_motion_dog.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do  13934 Aug 21 11:27 2023-10-02-java-spring-anatomy.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do  12664 Aug 21 11:27 2023-10-09-java-chatgpt.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do  16054 Aug 21 11:27 2023-10-09-javascript_api.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do 113646 Aug 21 11:27 2023-10-09-python_machine_learing_fitness.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do  16605 Aug 21 11:27 2023-11-13-jwt-python-flask.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do  16288 Aug 21 11:27 2023-11-13-vulnerabilities.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do  18712 Aug 21 11:27 2023-11-20-jwt-java-spring-challenge.md
-rw-r--r-- 1 kaiden_do kaiden_do  11089 Aug 21 11:27 2024-01-04-cockpit-setup.ipynb
drwxr-xr-x 2 kaiden_do kaiden_do   4096 Aug 21 11:27 files
%%script bash

# Extract saved variables
source /tmp/variables.sh

echo "Look for images in notebooks, print working directory, list files"
cd $notebooks/images  # this should exist per fastpages
pwd
ls -l
Look for images in notebooks, print working directory, list files
/home/kaiden_do/vscode/kaidenstudent/_notebooks


bash: line 6: cd: /images: No such file or directory


total 40
-rw-r--r-- 1 kaiden_do kaiden_do  5548 Aug 17 11:26 2023-08-17-AP-pseudo-vs-python.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do  8821 Aug 17 11:26 2023-08-21-VSCode-GitHub_Pages.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do 12697 Aug 23 12:49 2023-08-22-BASHNOTEBOOK.ipynb
-rw-r--r-- 1 kaiden_do kaiden_do  1333 Aug 23 12:21 2023-08-22-JAVANOTEBOOK.ipynb
%%script bash

# Extract saved variables
source /tmp/variables.sh

echo "Navigate to project, then navigate to area wwhere files were cloned"

cd $project
echo "show the contents of README.md"
echo ""

cat README.md  # show contents of file, in this case markdown
echo ""
echo "end of README.md"
Navigate to project, then navigate to area wwhere files were cloned
show the contents of README.md

## Teacher Blog site
This site is intended for the development of Teacher content.  This blogging site is built using GitHub Pages [GitHub Pages](https://docs.github.com/en/pages/getting-started-with-github-pages/creating-a-github-pages-site).
- The purpose is to build lessons and distribute across different Computer Science sections (CSSE, CSP, CSA), a pathway that covers 3 years of High School Instruction.
- The primary languages and frameworks that are taught are `JavaScript/HTML/CSS`, `Python/Flask`, `Java/Spring`.  Read below for more details.
- In this course, Teacher content is not exclusively developed by Teachers.  In fact, many Students have been invited to develop and publish content into this repository.  Their names will appear as authors on the content which they aided in producing.
- This site has incorporated ideas and has radically modified scripts from the now deprecated [fastpages](https://github.com/fastai/fastpages) repository.
- This site includes assistance and guideance from ChatGPT, [chat.openai.com](https://chat.openai.com/) 

### Courses and Pathway
The focus of the Del Norte Computer Science three-year pathway is `Full Stack Web Development`.  This focus provides a variety of technologies and exposures.  The intention of the pathway is breadth and exposure.
- `JavaScript` documents are focused on frontend development and for entry class into the Del Norte Computer Science pathway.  JavaScript documents and materials are a prerequisites to Python and Java classes.
- `Python` documents are focused on backend development and requirements for the AP Computer Science Principles exam.
- `Java` documents are focused on backend development and requirements for the AP Computer Sciene A exam.
- `Data Structures` materials embedded into JavaScript, Python, or Java documents are focused on college course articulation.

### Resources and Instruction
The materials, such as this README, as well as `Tools`, `DevOps`, and `Collaboration` resources are integral part of this course and Computer Science in general.  Everything in our environment is part of our learning of Computer Science. 
- `Visual Studio Code` is key the code-build-debug cycle editor used in this course, [VSCode download](https://code.visualstudio.com/).  This is an example of a resource, but inside of it it has features for collaboration.
- `Tech Talks`, aka lectures, are intended to be interactive and utilize `Jupyter Notebooks` and Websites.  This is an example of blending instruction and tools together, which in turn provide additional resources for learning.  For instance, deep knowledge on  GitHub Pages and Notebooks are valuable in understanding principles behind Full Stack Development and Data Science. 

## GitHub Pages
All `GitHub Pages` websites are managed on GitHub infrastructure. GitHub uses `Jekyll` to tranform your content into static websites and blogs. Each time we change files in GitHub it initiates a GitHub Action that rebuilds and publishes the site with Jekyll.  
- GitHub Pages is powered by: [Jekyll](https://jekyllrb.com/).
- Publised teacher website: [nighthawkcoders.github.io/teacher](https://nighthawkcoders.github.io/teacher/)

## Preparing a Preview Site 
In all development, it is recommended to test your code before deployment.  The GitHub Pages development process is optimized by testing your development on your local machine, prior to files on GitHub

Development Cycle. For GitHub pages, the tooling described below will create a development cycle  `make-code-save-preview`.  In the development cycle, it is a requirement to preview work locally, prior to doing a VSCode `commit` to git.

Deployment Cycle.  In the deplopyment cycle, `sync-github-action-review`, it is a requirement to complete the development cycle prior to doing a VSCode `sync`.  The sync triggers github repository update.  The action starts the jekyll build to publish the website.  Any step can have errors and will require you to do a review.

### WSL and/or Ubuntu installation requirements
- The result of these step is Ubuntu tools to run preview server.  These procedures were created using [jekyllrb.com](https://jekyllrb.com/docs/installation/ubuntu/)
```bash
# 
# WSL/Ubuntu setup
#
mkdir mkdir vscode
git clone https://github.com/nighthawkcoders/teacher.git
# run script, path vscode/teacher are baked in script
~/vscode/teacher/scripts/activate_ubuntu.sh
#=== !!!Start a new Terminal!!! ===
#=== Continue to next section ===
```

### MacOs installation requirements 
- Ihe result of these step are MacOS tools to run preview server.  These procedures were created using [jekyllrb.com](https://jekyllrb.com/docs/installation/macos/). 

```bash
# 
# MacOS setup
#
mkdir mkdir vscode
git clone https://github.com/nighthawkcoders/teacher.git
# run script, path vscode/teacher are baked in script
~/vscode/teacher/scripts/activate_macos.sh
#=== !!!Start a new Terminal!!! ===
#=== Continue to next section ===
```


### Run Preview Server
- The result of these step is server running on: http://0.0.0.0:4100/teacher/.  Regeneration messages will run in terminal on any save and update site upon refresh.  Terminal is active, press the Enter or Return key in the terminal at any time to see prompt to enter commands.

- Complete installation
```bash
cd ~/vscode/teacher
bundle install
make
```
- Run Server.  This requires running terminal commands `make`, `make stop`, `make clean`, or `make convert` to manage the running server.  Logging of details will appear in terminal.   A `Makefile` has been created in project to support commands and start processes.

    - Start preview server in terminal
    ```bash
    cd ~/vscode/teacher  # my project location, adapt as necessary
    make
    ```

    - Terminal output of shows server address. Cmd or Ctl click http location to open preview server in browser. Example Server address message... 
    ```
    Server address: http://0.0.0.0:4100/teacher/
    ```

    - Save on ipynb or md activiates "regeneration". Refresh browser to see updates. Example terminal message...
    ```
    Regenerating: 1 file(s) changed at 2023-07-31 06:54:32
        _notebooks/2024-01-04-cockpit-setup.ipynb
    ```

    - Terminal message are generated from background processes.  Click return or enter to obtain prompt and use terminal as needed for other tasks.  Alway return to root of project `cd ~/vscode/teacher` for all "make" actions. 
        

    - Stop preview server, but leave constructed files in project for your review.
    ```bash
    make stop
    ```

    - Stop server and "clean" constructed files, best choice when renaming files to eliminate potential duplicates in constructed files.
    ```bash
    make clean
    ```

    - Test notebook conversions, best choice to see if IPYNB conversion is acting up.
    ```bash
    make convert
    ```
    
end of README.md
%%script bash

# This command has no dependencies

echo "Show the shell environment variables, key on left of equal value on right"
echo ""

env
Show the shell environment variables, key on left of equal value on right

SHELL=/bin/bash
PYTHONUNBUFFERED=1
CONDA_EXE=/home/kaiden_do/anaconda3/bin/conda
_CE_M=
APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL=1
rvm_prefix=/home/kaiden_do
WSL_DISTRO_NAME=Ubuntu
rvm_stored_umask=0022
ELECTRON_RUN_AS_NODE=1
MY_RUBY_HOME=/home/kaiden_do/.rvm/rubies/ruby-2.7.7
VSCODE_AMD_ENTRYPOINT=vs/workbench/api/node/extensionHostProcess
RUBY_VERSION=ruby-2.7.7
NAME=Code
PWD=/home/kaiden_do/vscode/kaidenstudent/_notebooks
LOGNAME=kaiden_do
CONDA_PREFIX=/home/kaiden_do/anaconda3
rvm_version=1.29.12-next (master)
rvm_user_install_flag=1
PYDEVD_IPYTHON_COMPATIBLE_DEBUGGING=1
MOTD_SHOWN=update-motd
HOME=/home/kaiden_do
LANG=C.UTF-8
WSL_INTEROP=/run/WSL/22953_interop
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
WAYLAND_DISPLAY=wayland-0
CONDA_PROMPT_MODIFIER=(base) 
CLICOLOR=1
VSCODE_L10N_BUNDLE_LOCATION=
rvm_bin_path=/home/kaiden_do/.rvm/bin
GEM_PATH=/home/kaiden_do/.rvm/gems/ruby-2.7.7:/home/kaiden_do/.rvm/gems/ruby-2.7.7@global
GEM_HOME=/home/kaiden_do/.rvm/gems/ruby-2.7.7
LESSCLOSE=/usr/bin/lesspipe %s %s
VSCODE_HANDLES_SIGPIPE=true
TERM=xterm-color
_CE_CONDA=
LESSOPEN=| /usr/bin/lesspipe %s
USER=kaiden_do
GIT_PAGER=cat
PYTHONIOENCODING=utf-8
CONDA_SHLVL=1
rvm_loaded_flag=1
DISPLAY=:0
SHLVL=2
PAGER=cat
VSCODE_CWD=/mnt/c/Users/kaide/AppData/Local/Programs/Microsoft VS Code
MPLBACKEND=module://matplotlib_inline.backend_inline
CONDA_PYTHON_EXE=/home/kaiden_do/anaconda3/bin/python
XDG_RUNTIME_DIR=/mnt/wslg/runtime-dir
CONDA_DEFAULT_ENV=base
WSLENV=ELECTRON_RUN_AS_NODE/w:

VSCODE_WSL_EXT_LOCATION=/mnt/c/Users/kaide/.vscode/extensions/ms-vscode-remote.remote-wsl-0.81.0
XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop
PATH=/bin:/home/kaiden_do/.local/bin:/home/kaiden_do/.rvm/gems/ruby-2.7.7/bin:/home/kaiden_do/.rvm/gems/ruby-2.7.7@global/bin:/home/kaiden_do/.rvm/rubies/ruby-2.7.7/bin:/home/kaiden_do/.local/bin:/home/kaiden_do/anaconda3/bin:/home/kaiden_do/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files/Common Files/Oracle/Java/javapath:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0:/mnt/c/WINDOWS/System32/OpenSSH:/mnt/c/Users/kaide/AppData/Local/Programs/Git/cmd:/mnt/c/Program Files/Docker/Docker/resources/bin:/mnt/c/ProgramData/DockerDesktop/version-bin:/mnt/c/Users/kaide/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/kaide/AppData/Local/GitHubDesktop/bin:/mnt/c/Users/kaide/AppData/Local/Programs/Microsoft VS Code/bin:/snap/bin:/home/kaiden_do/.rvm/bin:/home/kaiden_do/.rvm/bin:/home/kaiden_do/.rvm/gems/ruby-2.7.7/bin:/home/kaiden_do/.rvm/gems/ruby-2.7.7@global/bin:/home/kaiden_do/.rvm/rubies/ruby-2.7.7/bin:/home/kaiden_do/.local/bin:/home/kaiden_do/anaconda3/bin:/home/kaiden_do/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files/Common Files/Oracle/Java/javapath:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0:/mnt/c/WINDOWS/System32/OpenSSH:/mnt/c/Users/kaide/AppData/Local/Programs/Git/cmd:/mnt/c/Program Files/Docker/Docker/resources/bin:/mnt/c/ProgramData/DockerDesktop/version-bin:/mnt/c/Users/kaide/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/kaide/AppData/Local/GitHubDesktop/bin:/mnt/c/Users/kaide/AppData/Local/Programs/Microsoft VS Code/bin:/snap/bin:/home/kaiden_do/.rvm/bin:/home/kaiden_do/.rvm/bin
VSCODE_NLS_CONFIG={"locale":"en","osLocale":"en","availableLanguages":{}}
HOSTTYPE=x86_64
IRBRC=/home/kaiden_do/.rvm/rubies/ruby-2.7.7/.irbrc
PULSE_SERVER=/mnt/wslg/PulseServer
VSCODE_HANDLES_UNCAUGHT_ERRORS=true
rvm_path=/home/kaiden_do/.rvm
VSCODE_IPC_HOOK_CLI=/mnt/wslg/runtime-dir/vscode-ipc-0e49c4bc-145b-410a-bc62-490bc42338ce.sock
_=/bin/env
%%script bash

# Extract saved variables
source /tmp/variables.sh

cd $project

echo ""
echo "show the secrets of .git"
cd .git
ls -l

echo ""
echo "look at config file"
cat config
show the secrets of .git
total 56
-rw-r--r-- 1 kaiden_do kaiden_do   102 Aug 22 23:49 FETCH_HEAD
-rw-r--r-- 1 kaiden_do kaiden_do    21 Aug 21 11:27 HEAD
drwxr-xr-x 2 kaiden_do kaiden_do  4096 Aug 21 11:27 branches
-rw-r--r-- 1 kaiden_do kaiden_do   267 Aug 21 11:27 config
-rw-r--r-- 1 kaiden_do kaiden_do    73 Aug 21 11:27 description
drwxr-xr-x 2 kaiden_do kaiden_do  4096 Aug 21 11:27 hooks
-rw-r--r-- 1 kaiden_do kaiden_do 11702 Aug 21 11:27 index
drwxr-xr-x 2 kaiden_do kaiden_do  4096 Aug 21 11:27 info
drwxr-xr-x 3 kaiden_do kaiden_do  4096 Aug 21 11:27 logs
drwxr-xr-x 4 kaiden_do kaiden_do  4096 Aug 21 11:27 objects
-rw-r--r-- 1 kaiden_do kaiden_do   112 Aug 21 11:27 packed-refs
drwxr-xr-x 5 kaiden_do kaiden_do  4096 Aug 21 11:27 refs

look at config file
[core]
	repositoryformatversion = 0
	filemode = true
	bare = false
	logallrefupdates = true
[remote "origin"]
	url = https://github.com/nighthawkcoders/teacher.git
	fetch = +refs/heads/*:refs/remotes/origin/*
[branch "main"]
	remote = origin
	merge = refs/heads/main
%%script bash

# This example has error in VSCode, it run best on Jupyter
cd /tmp

file="sample.md"
if [ -f "$file" ]; then
    rm $file
fi

tee -a $file >/dev/null <<EOF
# Show Generated Markdown
This introductory paragraph and this line and the title above are generated using tee with the standard input (<<) redirection operator.
- This bulleted element is still part of the tee body.
EOF

echo "- This bulleted element and lines below are generated using echo with standard output (>>) redirection operator." >> $file
echo "- The list definition, as is, is using space to seperate lines.  Thus the use of commas and hyphens in output." >> $file
actions=("ls,list-directory" "cd,change-directory" "pwd,present-working-directory" "if-then-fi,test-condition" "env,bash-environment-variables" "cat,view-file-contents" "tee,write-to-output" "echo,display-content-of-string" "echo_text_>\$file,write-content-to-file" "echo_text_>>\$file,append-content-to-file")
for action in ${actions[@]}; do  # for loop is very similar to other language, though [@], semi-colon, do are new
  action=${action//-/ }  # convert dash to space
  action=${action//,/: } # convert comma to colon
  action=${action//_text_/ \"sample text\" } # convert _text_ to sample text, note escape character \ to avoid "" having meaning
  echo "    - ${action//-/ }" >> $file  # echo is redirected to file with >>
done

echo ""
echo "File listing and status"
ls -l $file # list file
wc $file   # show words
mdless $file  # this requires installation, but renders markown from terminal

rm $file  # clean up termporary file
File listing and status
-rw-r--r-- 1 kaiden_do kaiden_do 809 Aug 23 12:50 sample.md
 15 132 809 sample.md


bash: line 30: mdless: command not found