gitea repo

This commit is contained in:
fred 2025-06-20 11:59:24 -07:00
commit f610209aff
66 changed files with 2439 additions and 0 deletions

View file

@ -0,0 +1,38 @@
### Docker ###
alias dps="docker ps --format '{{.Names}}'"
d_term(){
docker exec -it $1 /bin/bash
}
d_up(){
path=~/docker
if [[ -z "$1" && $(pwd) == "$path/"* ]]; then
docker compose up -d
elif [[ -z "$1" && $(pwd) != "$path/"* ]]; then
echo "not in compose folder"
elif [[ -n "$1" ]]; then
if ls "$path" | grep -q "$1"; then
(cd "$path/$1" && docker compose up -d)
else
echo "container $1 not found"
ls "$path"
fi
fi
}
d_down(){
path=~/docker
if [[ -z "$1" && $(pwd) == "$path/"* ]]; then
docker compose down
elif [[ -z "$1" && $(pwd) != "$path/"* ]]; then
echo "not in compose folder"
elif [[ -n "$1" ]]; then
if ls "$path" | grep -q "$1"; then
(cd "$path/$1" && docker compose down)
else
echo "container $1 not found"
ls "$path"
fi
fi
}

View file

@ -0,0 +1,23 @@
mp(){
nohup mousepad $1 </dev/null >/dev/null 2>&1 &
disown
}
cs(){
# cp -l fullpath fullpath/Documents/cheatsheet
# path=~/Documents/cheatsheet
path=/solid/dir/reference/cheatsheet/
if [[ -z "$1" ]]; then
ls $path
else
if [[ $2 = "-e" ]]; then
vim $path/$1
else
bat -pp $path/$1
fi
fi
}
timer(){
while true; do printf '%s\r' "$(date)"; done
}

View file

@ -0,0 +1,7 @@
alias ctllist="systemctl --type=service"
alias esc='setxkbmap -option "caps:swapescape"'
alias checkip="curl ipinfo.io"
alias hold='hold=$(pwd)'
alias ollama_up="./scripts/VM/VMmanager.sh macvtap; sudo virsh start ollama_vm"