Compare commits

..

127 Commits

Author SHA1 Message Date
109e1a3cf4 This will definitely break in 2079 (TODO) 2023-12-15 07:11:16 +00:00
5ddad72e69 Added oneshot watchtower run alias 2023-12-15 00:55:18 -06:00
a9f4ac8d5d commented out failing tests 2023-12-15 00:46:43 -06:00
70f8090ec3 Made docker prune not require confirmation and also added more verbosity 2023-12-12 19:39:56 -06:00
b4b145998a Made docker prune not require confirmation 2023-12-12 19:35:06 -06:00
f5f78941c4 added screen clear to home alias 2023-12-12 19:33:49 -06:00
bdfbd4419b Added watchtower zero-shot alias 2023-12-08 18:38:06 -06:00
769d114c86 fixed please alias 2023-11-25 15:33:48 -06:00
ba234a0dad added gitgraph alias 2023-11-24 16:05:34 -06:00
70db551648 added glances oneshot 2023-11-17 23:19:16 -06:00
db7a01f58e Adding some functions. Port list and compress files 2023-11-02 01:06:18 -05:00
514dd44858 reverted s alias so it works 2023-10-17 17:46:08 -05:00
Brad Ganley
ccd61e553d woops. Fixed the s alias 2023-10-17 18:43:46 -04:00
2950c3df5c Made the "s" alias better 2023-10-17 13:43:35 -05:00
da7ddfffb2 added scr alias 2023-08-22 18:55:04 -05:00
cbd4e310e5 Added cargo to path 2023-08-05 00:23:41 -05:00
79c84b3eda added tere function to aliases file 2023-08-05 00:14:45 -05:00
79f0de702c mergederp 2023-07-09 18:18:29 -05:00
ff47473e0b My bad 2023-06-17 19:10:11 -05:00
7fa5fccedf fix some fucking errors 2023-06-05 02:14:46 -05:00
93cc71411e added error if size not specified 2023-05-31 11:48:42 -05:00
3fb51b141d added ramdisk alias 2023-05-31 11:44:57 -05:00
42e5a4e97a I should have had a V8 this morning. 2023-05-15 01:39:59 -05:00
925dc2edb6 done. going to bed now. 2023-05-10 01:33:29 -05:00
99b38f2872 Reticulating splines... 2023-05-10 01:31:22 -05:00
c5f8e3a21a f 2023-04-27 14:06:57 -05:00
755a02ac7a project lead is allergic to changes... 2023-04-27 13:45:20 -05:00
97112a5757 No time to commit.. My people need me! 2023-04-13 23:59:54 -05:00
61de34fdb4 better cd 2023-04-08 21:33:14 -05:00
1ff4285cb5 I guess I changed some things. Legit do not know what they were 2023-04-06 01:18:55 -05:00
ea5b5126b6 ahhhh 2023-04-02 22:47:49 -05:00
f43b2a2831 fixed package list 2023-04-02 21:48:02 -05:00
799387d91a added setup script 2023-04-02 21:35:17 -05:00
9e332f7980 added arch package list. Need to remove certain ones 2023-04-02 21:28:36 -05:00
fc1c304fdc Added yay check 2023-04-01 15:11:44 -05:00
brad
02867aa246 shit's getting crazy 2023-04-01 14:19:02 -05:00
brad
f02c1cfbc7 making it so the answerfile actually functions again 2023-03-31 20:23:32 -05:00
brad
44305865c9 making it so the answerfile actually functions 2023-03-31 20:17:44 -05:00
brad
3276d2aea3 removed network config 2023-03-31 02:18:15 -05:00
brad
5de841dda1 added directory for alpine configs 2023-03-31 01:51:23 -05:00
ce5fb472d8 removed tests since i can't make them green 2023-03-19 01:17:41 -05:00
e8d63cba72 fixe 2023-03-19 01:13:20 -05:00
0145882277 added /dock to cd path 2023-03-10 17:44:20 +00:00
65dda2592a added /dock to cd path 2023-03-10 17:43:31 +00:00
f287a420c7 switched hackingtool to blackarch 2023-03-05 19:47:32 -06:00
6d8bc3ec6b added a basic vimrc to make it more doper 2023-03-04 02:59:05 -06:00
b98177ef19 I am Root. We are Root. 2023-02-26 05:51:31 -06:00
16c4cc9094 We are each gifted in a unique and important way. It is our privilege and our adventure to discover our own special light 2023-02-26 05:34:50 -06:00
5a016d14ed adding a beefier upgrade option 2023-02-26 05:17:30 -06:00
Brad Ganley
829579ca90 Added countdown timer 2023-02-13 02:29:06 -06:00
74f1200c25 Added bashlocal source for computer-specific aliasing 2023-01-15 15:14:39 -06:00
7737d68812 Added cnfrm 2023-01-14 15:41:50 -06:00
7f629e9b21 Added cnfrm 2023-01-14 15:38:14 -06:00
Brad Ganley
bf74b0e503 omfg 2023-01-13 16:32:07 -06:00
Brad Ganley
b6e12176a8 ugh 2023-01-13 16:30:56 -06:00
Brad Ganley
2c2479f0eb Made it so aliases work with sudo 2023-01-13 16:28:13 -06:00
d9375106a9 Check the diff 2023-01-13 01:49:04 -06:00
dadc1433b5 Deleting shit 2023-01-13 01:33:12 -06:00
9d17df58dc So many comments. A Lot of clean up, removing duplicates, etc etc, ad infinitum 2023-01-13 01:16:48 -06:00
f038875e1f cleaning up a bit 2023-01-13 00:57:34 -06:00
855f669156 Added needrs command 2023-01-13 00:47:07 -06:00
9c973380a1 fuck i don't even know 2023-01-12 02:57:16 -06:00
04707c30c4 ls -l to ls -hog to save screen space 2023-01-12 00:17:23 -06:00
a5ae3e496d added CD_PATH 2023-01-10 13:42:30 -06:00
1097d2947c added hackingtool 2023-01-02 12:30:53 -06:00
3fd11f6524 added redoco to restart containers 2022-12-05 00:05:00 -06:00
38e6172d28 Added a lil speed test 2022-11-14 19:17:33 -06:00
f8cc38f5f0 ugh 2022-10-10 22:07:08 -05:00
5899239d7a Merge branch 'master' of https://git.toad.city/brad/configs 2022-10-10 22:05:40 -05:00
923933a54e more updates 2022-10-10 22:04:44 -05:00
ca14386132 updates 2022-10-10 22:03:29 -05:00
8f77766ed6 yabs 2022-09-19 17:56:31 -05:00
665b9cc70b ... 2022-08-16 00:44:12 -05:00
bc9f171b94 added functions 2022-08-01 13:03:26 -05:00
69f610d776 forgot nmapplet 2021-12-02 00:45:04 -06:00
7d25702d0d new i3 config 2021-12-01 11:51:03 -06:00
e09f2cf730 fuck 2021-11-08 16:03:26 -06:00
093e29974c added netdiscovery 2021-11-08 15:51:49 -06:00
Brad Ganley
cb9ce1ce59 Still cleaning 2021-07-15 13:40:11 -05:00
Brad Ganley
e70814accb Getting rid of things I'm not using 2021-07-15 13:39:49 -05:00
Brad Ganley
34066227cc removed broken script file 2021-07-15 13:38:42 -05:00
Brad Ganley
956f0fe231 Removed aliases from rc that were duped in aliases 2021-07-15 13:35:23 -05:00
Brad Ganley
cce09ab331 Added external ip function to bash aliases 2021-07-15 12:30:37 -05:00
Brad Ganley
1c813a245c added ding function to ping and alert when a host comes online 2021-06-22 13:45:35 -05:00
Brad Ganley
d5b7ff4dff added cheat.sh 2021-06-02 14:53:58 -05:00
Brad Ganley
3af68cdb8f added fucking sudo 2021-06-02 14:41:20 -05:00
Brad Ganley
1573eb4ce9 askdjfasd 2021-05-24 13:11:13 -05:00
Brad Ganley
77f9458afb rtfm 2021-05-24 13:08:29 -05:00
Brad Ganley
048b599636 batcat among other things 2021-05-24 13:04:53 -05:00
Brad Ganley
1500a9f113 This is better 2021-05-19 02:03:21 -05:00
Brad Ganley
6f878edfe2 fixed some shit 2021-05-18 23:40:08 -05:00
Brad Ganley
7b65517b06 added bash_aliases 2021-05-18 13:14:51 -05:00
Brad Ganley
58ebab4af2 Added diffuse alias 2020-11-16 16:33:50 -06:00
Brad Ganley
a1aeef95c8 added tmux list sessions alias 2020-10-26 13:33:37 -05:00
Brad Ganley
06c19651c0 I guess I wasn't finished modifying things 2020-10-19 13:37:51 -05:00
Brad Ganley
e6121a2063 Periodic update for all my bullshit 2020-10-09 13:23:52 -05:00
Brad Ganley
bf7e602d40 I would have bet money that this file was already in here but, alas, here we are 2020-10-09 13:11:52 -05:00
Brad Ganley
dbd0a31e3e Added backup of crontab (crontab -l > file) for Arch. Intending to flesh it out over time 2020-10-08 13:12:28 -05:00
Brad Ganley
61100c2321 added Rclone alias so I can stop typing so fucking much 2020-09-30 13:48:53 -05:00
Brad Ganley
feee3c0476 I'm not sure what's different but evidently something changed. 2020-09-30 13:16:52 -05:00
Brad Ganley
75c0464459 ugh 2020-09-24 16:25:35 -05:00
Brad Ganley
6f7fba09c7 Removie termite from i3 config because fuck 2020-09-24 15:54:07 -05:00
Brad Ganley
9738f5facc Fixed an issue with dmenu/rofi 2020-09-23 18:38:31 -05:00
Brad Ganley
f8b8d73a9f Handled a particular error. 2020-09-20 21:10:56 -05:00
Brad Ganley
ace195d48e Added exa aliases 2020-09-20 20:46:36 -05:00
Brad Ganley
c5299b6d27 Update vimrc and bash(zsh)rc 2020-09-19 18:55:50 -05:00
Brad Ganley
ae407bdff2 too much bullshit 2020-09-19 18:24:45 -05:00
Brad Ganley
4d233a68a2 Create .gitignore 2020-09-17 18:57:41 -05:00
Brad
f8ef62623b I'm sorry. 2019-05-10 15:56:02 -05:00
Brad
594e40f661 fixed conflicts (LOL merge -s ours; push -f) 2019-05-01 17:19:06 -05:00
Brad
dc30aa2f54 Do things better, faster, stronger 2019-04-25 18:07:37 -05:00
Brad
f422dcd8c7 This is a basic implementation that works. 2019-04-05 18:45:27 -05:00
Brad
da036dd7ee Better lsa alias 2019-03-21 12:03:06 -05:00
Brad
a504367cc3 One little whitespace gets its very own commit! Oh, life is so erratic! 2019-03-20 15:00:48 -05:00
Brad Ganley
2149d47aab Committing fixes in the dark, seriously, who killed my power!? 2019-03-17 01:50:06 -05:00
Brad Ganley
84a3080a18 I __ a word 2019-03-16 21:49:08 -05:00
Brad Ganley
45a06d4f52 Merge branch 'master' of https://github.com/Bradart/configs 2019-03-14 22:12:13 -05:00
Brad Ganley
096c097f36 fix some fucking errors 2019-03-13 23:08:18 -05:00
Brad
681fb493f7 Please no changes this time. 2019-03-13 18:43:05 -05:00
Brad Ganley
3dbb02f338 third time's a charm 2019-03-13 16:17:34 -05:00
Brad Ganley
b521468ae5 move your body every every body 2019-03-13 16:14:12 -05:00
Brad
2b1eaa2c39 bifurcation 2019-03-13 15:58:16 -05:00
Brad
4a59e1b816 ID:10T Error 2019-03-13 15:15:16 -05:00
Brad
43f9c9d6e8 Added termite and Tizonia Configs 2019-03-12 16:31:24 -05:00
Brad
dd53257e10 lots of changes after a lot of time 2019-03-12 15:39:11 -05:00
Brad
6d977e397f Continued development... 2019-03-12 15:09:48 -05:00
Brad
b936d6c24f bug fix 2019-03-12 13:36:46 -05:00
8 changed files with 170 additions and 170 deletions

View File

@@ -5,7 +5,7 @@ fi
# Application management
case "$ID" in
ubuntu|debian|pop)
ubuntu|debian)
# Install something bypassing the prompts
alias inst='sudo apt-get install -y'
# Do a basic update
@@ -59,9 +59,10 @@ case "$ID" in
# Add any other distribution-specific aliases here
;;
esac
# General
# Get $HOME quick
alias ~='cd $HOME;clear'
alias ~='cd ~/;clear'
# A Nice display of all files in a directory
alias ll='ls -hog'
# Above but...different I'm sure
@@ -77,13 +78,14 @@ alias fucking='sudo'
# Install bat. It's better.
alias cat='bat'
# Source this very file
alias src='source $HOME/.bashrc'
alias src='source ~/.bashrc'
# Big Boy edit something
alias svim='sudo vim'
# Ping but with sounds
alias ding='ping -i 5 -a'
# An extremely useful benchmark script
alias yabs='curl -sL yabs.sh | bash'
# Utilities
# A faster way to do the thing it does
alias sysres='sudo systemctl restart'
@@ -91,22 +93,52 @@ alias sysres='sudo systemctl restart'
alias sysup='sudo systemctl enable --now'
# Also this one
alias sysdn='sudo systemctl disable --now'
#opens specified command in new window in screen session
alias s='screen -X screen '
# Resume screen or create a new one named main
alias scr='screen -r || screen -S main'
# press enter to continue. Occasionally useful
alias cnfrm='read -p "Press enter to proceed" '
# A more intense ping for the professional on the go
alias pang='ping -i 10 -v -a'
# List the mounted things
alias mnts='mount | column -t'
# The history command but shorter
alias h='history'
# Lazy docker composing. Set the variable somewhere.
alias doco="$DOCKER_COMPOSE_COMMAND"
alias redoco="$DOCKER_COMPOSE_COMMAND down && $DOCKER_COMPOSE_COMMAND up -d"
alias redog="$DOCKER_COMPOSE_COMMAND down && $DOCKER_COMPOSE_COMMAND up -d; $DOCKER_COMPOSE_COMMAND logs -f"
alias dolog="$DOCKER_COMPOSE_COMMAND up -d; $DOCKER_COMPOSE_COMMAND logs -f"
alias watchtower="docker run -d --restart unless-stopped --name 'watch-$(date +%H%M)' -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower "
alias onetower="docker run --rm -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --run-once"
# Regain all that space taken up by projects you abandoned
alias docprune='echo "Pruning images"; docker image prune -f && echo "Pruning networks"; docker network prune -f && echo "Pruning containers"; docker container prune -f && echo "Pruning Volumes"; docker volume prune -f'
# Send things instantly to a pastebin. Pipe other commands into this to share their output.
alias bin='nc termbin.com 9999'
# Quicker Docker exec
alias dex='docker exec'
alias dps="docker ps --format 'CONTAINER ID: {{.ID}}\nIMAGE: {{.Image}}\nCOMMAND: {{.Command}}\nCREATED: {{.CreatedAt}}\nSTATUS: {{.Status}}\nPORTS: {{.Ports}}\nNAMES: {{.Names}}\n'|cat"
alias lzd='docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock -v ~/lzd:/.config/jesseduffield/lazydocker lazyteam/lazydocker'
alias glance='docker run --rm -e TZ="${TZ}" -v /var/run/docker.sock:/var/run/docker.sock:ro -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro --pid host --network host -it nicolargo/glances:latest-full'
alias ytdlp='docker run --rm -v "/nasty/ytdl:/media" -it jauderho/yt-dlp:latest '
# Misc
# Get the weather. Put your location after the command
alias wttr='ansiweather -u imperial -s false -l'
alias wtr='curl -s "https://wttr.in/?format=%l:+%c+%t+%w+%p"'
#Read the fucking manual
rtfm() { help $@ || info $@ || man $@ || curl "http://cheat.sh/$@"; }
# Get your public IP
extip(){ ip=$(curl -s http://api.ipify.org);
echo "Public IP address is $ip"
}
# Cheatsheet for linux commands
ch() { curl "http://cheat.sh/$@"; }
# You can go to noti.toad.city and generate your own code to get browser notifications. It's all explained there. You'll need to modify this value
notica() { curl --data "d:$*" "https://noti.toad.city/?VFvu53" ; }
# A quick lil speedyboi
alias speedTest='curl -s https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python3 -'
# If you're runnng my exact mastodon setup, this will be useful
@@ -116,9 +148,81 @@ alias hackingtool='docker run -it --net=host --security-opt seccomp=unconfined -
# Do you need to reboot? Find out here!
alias needrs='[ -f /var/run/reboot-required ] && echo "You need to reboot"'
alias gitgraph='git log --graph --oneline --decorate'
## See open ports
# Countdown Timer
countdown() {
start="$(( $(date '+%s') + $1))"
while [ $start -ge $(date +%s) ]; do
time="$(( $start - $(date +%s) ))"
printf '%s\r' "$(date -u -d "@$time" +%H:%M:%S)"
sleep 0.1
done
}
# Random quote to avoid making useful commit messages
function rgcm() {
api="https://whatthecommit.com/index.txt"
message=$(curl -s $api)
if [[ -z $message ]]; then
echo "Error: Failed to retrieve a random commit message"
return 1
fi
git add .
git commit -m "$message"
echo "Git commit submitted with message: $message"
}
function cntdn() {
local count=$1
while [ $count -gt 0 ]; do
echo -en "\n$count... "
if [ $count -eq 3 ]; then
echo "You've still got a few seconds to live it up before your time runs out!"
elif [ $count -eq 2 ]; then
echo "Tick-tock, tick-tock, time's running out!"
elif [ $count -eq 1 ]; then
echo "You had a good run, but it's time to face the music!"
fi
sleep 1
((count--))
done
echo "Time's up!"
}
function ramdisk() {
if [ -z "$1" ]; then
echo "Error: Ramdisk size not specified."
return 1
fi
if [ ! -d "$HOME/ramdown" ]; then
mkdir "$HOME/ramdown"
fi
size="$1"
sudo mount -t tmpfs -o size="$size" tmpfs "$HOME/ramdown"
}
ipin() {
local ip=$1
local endpoint="https://ipinfo.io"
# Append IP to the endpoint if provided
if [[ -n $ip ]]; then
endpoint+="/$ip"
fi
endpoint+="/json?token=4ea2457429bf23"
# Make the API call and prettify the JSON response
curl -s "$endpoint" | jq .
}
# Tere function
tere() {
local result=$(command tere "$@")
[ -n "$result" ] && cd -- "$result"
}
# Compress files. Like the name says.
function compress_files() {
if [ -z "$1" ]; then
echo "Usage: compress_files <archive_name.zip> <file1> <file2> ..."
else
zip -r "$1" "${@:2}"
fi
}
# See open ports
alias ports='netstat -tuln '
# gping
alias gping='docker run --rm -ti --network host ghcr.io/orf/gping'
alias proxon='export ALL_PROXY=socks5://fatshark.duckdns.org:666; echo "IP: $(curl -s ifconfig.me)"'
alias proxoff='unset ALL_PROXY; echo "IP: $(curl -s ifconfig.me)"'

View File

@@ -1,21 +0,0 @@
export DOCKER_COMPOSE_COMMAND="docker compose"
# Lazy docker composing. Set the variable somewhere.
alias doco="$DOCKER_COMPOSE_COMMAND"
alias redoco="$DOCKER_COMPOSE_COMMAND down && $DOCKER_COMPOSE_COMMAND up -d"
alias redog="$DOCKER_COMPOSE_COMMAND down && $DOCKER_COMPOSE_COMMAND up -d; $DOCKER_COMPOSE_COMMAND logs -f"
alias dolog="$DOCKER_COMPOSE_COMMAND up -d; $DOCKER_COMPOSE_COMMAND logs -f"
alias dogs="$DOCKER_COMPOSE_COMMAND logs -f"
alias watchtower="docker run -d --restart unless-stopped --name 'watch-$(date +%H%M)' -v /var/run/docker.sock:/var/run/docker.sock -v /etc/localtime:/etc/localtime:ro ghcr.io/nicholas-fedor/watchtower:latest --cleanup "
alias watchonce="docker run -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/nicholas-fedor/watchtower:latest --run-once"
alias onetower="docker run --rm -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/nicholas-fedor/watchtower:latest --run-once"
alias docport='docker container ls --format "table {{.ID}}\t{{.Names}}\t{{.Ports}}" -a'
alias docprune='echo "Pruning images"; docker image prune -f && echo "Pruning networks"; docker network prune -f && echo "Pruning containers"; docker container prune -f && echo "Pruning Volumes"; docker volume prune -f' # Regain all that space taken up by projects you abandoned
alias bin='nc termbin.com 9999' # Send things instantly to a pastebin. Pipe other commands into this to share their output.
alias dex='docker exec' # Quicker Docker exec
alias dps="docker ps --format 'CONTAINER ID: {{.ID}}\nIMAGE: {{.Image}}\nCOMMAND: {{.Command}}\nCREATED: {{.CreatedAt}}\nSTATUS: {{.Status}}\nPORTS: {{.Ports}}\nNAMES: {{.Names}}\n'|cat"
alias lzd='docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock -v ~/lzd:/.config/jesseduffield/lazydocker lazyteam/lazydocker'
alias doctime="docker ps --format 'CONTAINER NAME: {{.Names}}\nUPTIME: {{.Status}}'|cat"
alias glance='docker run --rm -e TZ="${TZ}" -v /var/run/docker.sock:/var/run/docker.sock:ro -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro --pid host --network host -it nicolargo/glances:latest-full'
alias ytdlp='docker run --rm -v /home/brad:/media -it --user 1000:1000 jauderho/yt-dlp:latest -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4"'

View File

@@ -1,90 +0,0 @@
#Read the fucking manual
rtfm() { help $@ || info $@ || man $@ || curl "http://cheat.sh/$@"; }
# Get your public IP
extip(){ ip=$(curl -s http://api.ipify.org);
echo "Public IP address is $ip"
}
# Cheatsheet for linux commands
ch() { curl "http://cheat.sh/$@"; }
# You can go to noti.toad.city and generate your own code to get browser notifications. It's all explained there. You'll need to modify this value
notica() { curl --data "d:$*" "https://noti.toad.city/?VFvu53" ; }
# Countdown Timer
countdown() {
start="$(( $(date '+%s') + $1))"
while [ $start -ge $(date +%s) ]; do
time="$(( $start - $(date +%s) ))"
printf '%s\r' "$(date -u -d "@$time" +%H:%M:%S)"
sleep 0.1
done
}
# Random quote to avoid making useful commit messages
function rgcm() {
api="https://whatthecommit.com/index.txt"
message=$(curl -s $api)
if [[ -z $message ]]; then
echo "Error: Failed to retrieve a random commit message"
return 1
fi
git add .
git commit -m "$message"
echo "Git commit submitted with message: $message"
}
function cntdn() {
local count=$1
while [ $count -gt 0 ]; do
echo -en "\n$count... "
if [ $count -eq 3 ]; then
echo "You've still got a few seconds to live it up before your time runs out!"
elif [ $count -eq 2 ]; then
echo "Tick-tock, tick-tock, time's running out!"
elif [ $count -eq 1 ]; then
echo "You had a good run, but it's time to face the music!"
fi
sleep 1
((count--))
done
echo "Time's up!"
}
function ramdisk() {
if [ -z "$1" ]; then
echo "Error: Ramdisk size not specified."
return 1
fi
if [ ! -d "$HOME/ramdown" ]; then
mkdir "$HOME/ramdown"
fi
size="$1"
sudo mount -t tmpfs -o size="$size" tmpfs "$HOME/ramdown"
}
ipin() {
local ip=$1
local endpoint="https://ipinfo.io"
# Append IP to the endpoint if provided
if [[ -n $ip ]]; then
endpoint+="/$ip"
fi
endpoint+="/json?token=4ea2457429bf23"
# Make the API call and prettify the JSON response
curl -s "$endpoint" | jq .
}
# Tere function
tere() {
local result=$(command tere "$@")
[ -n "$result" ] && cd -- "$result"
}
# Compress files. Like the name says.
function compress_files() {
if [ -z "$1" ]; then
echo "Usage: compress_files <archive_name.zip> <file1> <file2> ..."
else
zip -r "$1" "${@:2}"
fi
}

31
.bashrc
View File

@@ -4,13 +4,8 @@
alias sudo='sudo '
#what cd should do by default
if command -v batcat &> /dev/null
then
alias cd='cd_func'
alias bat='batcat '
fi
alias cd='cd_func'
alias bat='batcat '
cd_func ()
{
builtin cd "$@" && ls --color=auto --group-directories-first --format=single-column
@@ -68,8 +63,7 @@ if [ -n "$force_color_prompt" ]; then
fi
if [ "$color_prompt" = yes ]; then
#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
PS1='\[\e]0;\u@\h: \w\a\]\[\033[;32m\]┌──(\[\033[1;34m\]\u\[\033[33m\]↳\[\033[35m\]\h\[\033[;32m\])-[\[\033[44;1;33m\]\w\[\033[;32m\]]\n\[\033[31m\]⇛\[\033[33m\]⇛\[\033[93;25m\]⇛\[\033[92m\]⇛\[\033[32m\]⇛\[\033[34m\]⇛\[\033[36m\]⇛ \[\033[0m\]'
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
@@ -134,12 +128,7 @@ fi
if [ -f ~/.bashlocal ]; then
. ~/.bashlocal
fi
if [ -f ~/.bash_docker ]; then
. ~/.bash_docker
fi
if [ -f ~/.bash_functions ]; then
. ~/.bash_functions
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
@@ -176,14 +165,4 @@ extract () {
}
export PATH="$HOME/.cargo/bin:$HOME/.local/bin:$PATH"
export CDPATH=:..:$HOME:$HOME/dock:/dock
alias colors='for x in {16..231}; do printf "\e[48;5;${x}m%03d\e[0m " $x; done'
#fastfetch
printf "\n%s %s | Load: %s | Uptime: %s\n" \
"$(hostname -s)" \
"$(date +%H:%M)" \
"$(cut -d' ' -f1-3 /proc/loadavg)" \
"$(uptime -p | sed 's/up //')"
df -h . | awk 'NR==2{printf "Disk: %s free of %s\n",$4,$2}'
curl -s "https://wttr.in/?format=%l:+%c+%t+%w+%p"
echo
export CDPATH=:..:~:~/dock:/dock

35
bashset.sh Executable file → Normal file
View File

@@ -1,21 +1,16 @@
#!/bin/bash
echo $HOME/.bashrc
ln -s $PWD/.bashrc $HOME/.bashrc
echo "done"
echo $HOME/.bash_aliases
ln -s $PWD/.bash_aliases $HOME/.bash_aliases
echo $HOME/.bash_docker
ln -s $PWD/.bash_docker $HOME/.bash_docker
echo "done"
echo $HOME/.bash_functions
ln -s $PWD/.bash_functions $HOME/.bash_functions
echo "done"
echo $HOME/.vimrc
ln -s $PWD/.vimrc $HOME/.vimrc
echo "done"
echo $HOME/.bashlocal
touch $HOME/.bashlocal
echo "done"
read -p "lol maybe it worked"
source ~/.bashrc
exit 0
mv ~/.bashrc ~/.bashrc.bak
ln -s .bashrc ~/.bashrc
ln -s .bash_aliases ~/.bash_aliases
touch ~/.bashlocal
echo "Would you like to intall the contents of the package list in the arch foler? (yes/no)"
read answer
if [ "$answer" == "yes" ] || [ "$answer" == "y" ]; then
echo "Fuck yeah"
sudo pacman -S --needed $(\cat arch/pkglist.txt)
else
echo "Exiting the script."
exit 0
fi

View File

@@ -1 +0,0 @@
Starting Nmap 7.80 ( https://nmap.org ) at 2024-07-07 19:34 CDT

View File

@@ -1,3 +0,0 @@
## These are my configs
I usually just clone the repo into the home directory of whatever machine I'm on (`git clone https://git.toad.city/brad/configs`), `cd` into the project directory(`cd configs`), and make executable/execute the install script (`chmod +x bashset.sh; ./bashset.sh`)
You could do something different. I don't actually care.

37
transcribe.sh Executable file
View File

@@ -0,0 +1,37 @@
#!/bin/bash
# Check if an argument was passed
if [ $# -eq 0 ]
then
echo "Usage: $0 <audio file>"
exit 1
fi
# Check if the audio file exists
if [ ! -f "$1" ]
then
echo "Error: File '$1' does not exist"
exit 1
fi
# Get the current date and time
datetime=$(date +"%Y%m%d-%H%M%S")
# Determine the file extension
extension="${1##*.}"
# Convert the audio file to text using Whisper
response=$(curl -s \
-H "Authorization: Bearer ${OPENAI_API_KEY}" \
-F "file=@$1" \
-F "model=whisper-1" \
-F "response_format=json" \
https://api.openai.com/v1/audio/transcriptions)
# Extract the text from the response
text=$(echo "$response" | jq -r '.text')
# Save the text to a file with a unique filename based on the date
echo "$text" > "${datetime}.${extension}.txt"
echo "Transcription saved to ${datetime}.${extension}.txt"