Here is an example of using the kbd tags:
Press j to go left
| #!/bin/bash | |
| set -e # Exit on any error | |
| echo "Starting system setup..." | |
| # Update system | |
| echo "Updating system packages..." | |
| sudo apt update && sudo apt upgrade -y | |
| # Install basic packages |
| #!/bin/bash | |
| # Define the path to search for | |
| SEARCH_PATH="/usr/local/bin" | |
| # Define the files to search within | |
| FILES_TO_CHECK=( | |
| "$HOME/.bash_profile" | |
| "$HOME/.bashrc" | |
| "$HOME/.profile" |
Here is an example of using the kbd tags:
Press j to go left
| # Delete all forks that haven't been updated since 2020 | |
| gh auth refresh -h github.com -s delete_repo | |
| gh search repos \ | |
| --owner ryancheley \ | |
| --updated="<2020-01-01" \ | |
| --include-forks=only \ | |
| --limit 100 \ | |
| --json url \ | |
| --jq ".[] .url" \ | xargs -I {} gh repo delete {} --confirm |
| #!/bin/bash | |
| << comment | |
| The script here expexts the version of Python you're trying to install with the Semantic Version MAJOR.MINOR.PATCH, i.e. 3.11.1. | |
| If the version does not exist, an error will be generaeted | |
| comment |
| (echo -n " /home/pi/Documents/python_projects/hummingbird.mp4") >> /home/pi/Documents/python_projects/create_mp4.sh |
| #!/bin/bash | |
| (array=($(ls /home/pi/Documents/python_projects/*.h264)); for index in ${!array[@]}; do if [ "$index" -eq 0 ]; then echo -n " -add ${array[index]}"; else echo -n " -cat ${array[index]}"; fi; done;) |
| (echo '#!/bin/sh'; echo -n "MP4Box"; ) >> /home/pi/Documents/python_projects/create_mp4.sh |
| (echo '#!/bin/sh'; echo -n "MP4Box"; array=($(ls *.h264)); for index in ${!array[@]}; do if [ "$index" -eq 1 ]; then echo -n " -add ${array[index]}"; else echo -n " -cat ${array[index]}"; fi; done; echo -n " hummingbird.mp4") > com.txt | chmod +x com.txt | ./com.txt |