Skip to content

Instantly share code, notes, and snippets.

View ryancheley's full-sized avatar
🏒
Another Day in Paradise

Ryan Cheley ryancheley

🏒
Another Day in Paradise
View GitHub Profile
@ryancheley
ryancheley / setup.sh
Last active August 24, 2025 18:05
Fish and Atuin Setup
#!/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"
@ryancheley
ryancheley / kbd.md
Created December 29, 2023 04:18
kbd tag in markdown on GitHub

Here is an example of using the kbd tags:

Press j to go left

@ryancheley
ryancheley / tidy.sh
Last active April 22, 2023 20:17 — forked from tonybaloney/tidy.sh
tidy script
# 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
@ryancheley
ryancheley / python_install.sh
Last active January 22, 2023 21:15
Install Python on Raspberry Pi
#!/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
@ryancheley
ryancheley / create_script_03.sh
Created May 3, 2018 00:36
Step 1 of creating an mp4
(echo -n " /home/pi/Documents/python_projects/hummingbird.mp4") >> /home/pi/Documents/python_projects/create_mp4.sh
@ryancheley
ryancheley / create_script_02.sh
Last active May 3, 2018 00:37
Step 2 of creating an mp4
#!/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;)
@ryancheley
ryancheley / create_script_01.sh
Created May 3, 2018 00:35
Step 1 of creating an mp4
(echo '#!/bin/sh'; echo -n "MP4Box"; ) >> /home/pi/Documents/python_projects/create_mp4.sh
@ryancheley
ryancheley / compile_h264_using_MP4Box
Created February 17, 2018 21:59
My first really complicated Bash Script
(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