Remove not-yet-updated files

This commit is contained in:
Nick Chambers 2024-05-13 02:19:32 -05:00
parent 15854b03c2
commit 4b69a1cc4c
7 changed files with 0 additions and 166 deletions

View File

@ -1,14 +0,0 @@
if [[ -v DYLD_LIBRARY_PATH ]]; then
DYLD_LIBRARY_PATH+=":$HOME/lib"
else
DYLD_LIBRARY_PATH=$HOME/lib
fi
if [[ -v LIBRARY_PATH ]]; then
LIBRARY_PATH+=":$HOME/lib"
else
LIBRARY_PATH=$HOME/lib
fi
export {DYLD_,}LIBRARY_PATH
mkdir -p ~/lib

View File

@ -1,7 +0,0 @@
refresh() {
printf "\x1B[H\x1B[2J\x1B[3J"
}
linux-man() {
ssh -t scooter man "$@"
}

View File

@ -1,23 +0,0 @@
read -rd "" cal_events <<'EOF'
3,17,Saint Patrick's day,Happy,🍀
10,31,Halloween,Have a spooky,🎃
12,25,Christmas,Merry,🌲
EOF
if [[ -f ~/.events.csv ]]; then
cal_events=$(< ~/.events.csv)
fi
read -r cur_{month,day} < <(date "+%m %d")
while IFS=, read -r ev_month ev_day ev celebrate sym; do
if (( 10#$cur_month == 10#$ev_month )); then
if (( 10#$cur_day < 10#$ev_day )); then
printf "Only %d days until %s!\n" "$(( 10#$ev_day - 10#$cur_day ))" "${ev^}"
elif (( 10#$cur_day == 10#$ev_day )); then
printf "%s %s!\n" "$celebrate" "${ev^}"
fi
PS1_prompt_sym=$sym
fi
done <<< "$cal_events"

View File

@ -1,53 +0,0 @@
cattle-reset-elapsed() {
(( last_cmd_at = SECONDS ))
}
cattle-ping-timer() {
kill -USR1 "$reaper_pid"
}
cattle-slay-reaper() {
kill -KILL "$reaper_pid"
}
cd() {
command cd "$@"
printf %s "$PWD" > /tmp/iterm2-prev-dir.txt
}
{
trap "" INT
trap cattle-reset-elapsed USR1
last_cmd_at=0
while sleep 1; do
(( elapsed = SECONDS - last_cmd_at ))
if (( elapsed > 600 )); then
kill -KILL "$$"
exit
fi
done
} &
reaper_pid=$! PROMPT_COMMAND+=(cattle-ping-timer)
trap cattle-slay-reaper EXIT
if [[ -f /tmp/iterm2-prev-dir.txt ]]; then
cur_time=$(date +%s)
last_mod=$(stat -f%c /tmp/iterm2-prev-dir.txt)
if (( cur_time - last_mod > 1200 )); then
rm -f /tmp/iterm2-prev-dir.txt
else
dir=$(</tmp/iterm2-prev-dir.txt)
if [[ -d $dir ]]; then
command cd "$dir"
fi
unset dir
fi
unset cur_time last_mod
fi

View File

@ -1,4 +0,0 @@
if [[ -d ~/.rvm && -s ~/.rvm/scripts/rvm ]]; then
. ~/.rvm/scripts/rvm
add-path ~/.rvm/bin
fi

View File

@ -1,37 +0,0 @@
tab-ssh-hosts() {
mapfile -t hosts < <(awk 'tolower($1) == "host" { print $2 }' ~/.ssh/config)
mapfile -t COMPREPLY < <(compgen -W "${hosts[*]}" -- "${COMP_WORDS[COMP_CWORD]}")
return 0
}
complete -o default -F tab-ssh-hosts ssh scp ssh-copy-id sftp
tab-make-targets() {
local arg prev file targets
if [[ -f makefile ]]; then
file=makefile
elif [[ -f Makefile ]]; then
file=Makefile
fi
for arg in "${COMP_WORDS[@]}"; do
if [[ $prev = -f ]]; then
file=$arg
elif [[ $arg = -f* ]]; then
file=${arg#-f}
fi
prev=$arg
done
mapfile -t targets < <(
awk '$1 ~ /:$/ && $1 !~ /^\./ { gsub(/:$/, "", $1); print $1 }' "$file"
)
mapfile -t COMPREPLY < <(
compgen -W "${targets[*]}" -- "${COMP_WORDS[COMP_CWORD]}"
)
}
complete -o default -F tab-make-targets make gmake

View File

@ -1,28 +0,0 @@
###
# Utilities
###
ll() {
command ls -AlF "$@"
}
ssh() {
TERM=xterm-256color command ssh "$@"
}
awk-find() {
if (( $# > 1 )); then
local find_in=${TO_FIND:-.} file pattern=$1 to_find=( )
for file in "${@:2}"; do
to_find+=(-name "$file" -o)
done
find "$find_in" -not -name . "(" "${to_find[@]::${#to_find[@]} - 1}" ")" -print0 |
awk -F / -v RS="\0" "$pattern"
fi
}
clbin() {
tail -n +1 -- "$@" | curl -sSF 'clbin=<-' https://clbin.com
}