10 alias xc
='xclip -sel clip'
11 alias fonts
=" fc-list | sed 's/^.*: //' | awk -F: '{print $1}' | sort | uniq"
12 alias lsb
="dmesg | egrep '^(cd|wd|sd|fd). at ' | sort | uniq"
13 alias sc
="rsync -avzhe ssh --progress"
14 alias cpp
="rsync -avzhe --progress"
15 [ "$(uname)" = "OpenBSD" ] && alias ulocate
="doas /usr/libexec/locate.updatedb"
16 [ "$(uname)" = "OpenBSD" ] && alias gr
='grep -Inr' ||
alias gr
='grep -Inr --color=always'
19 [ "$(uname)" = "Linux" ] && valf
='-s'
20 alias val
="valgrind --trace-children=yes --track-fds=yes --track-origins=yes --leak-check=full --show-leak-kinds=all $valf"
21 [ "$(uname)" = "OpenBSD" ] && alias sys
="less /sys/sys/syscall.h" ||
alias sys
="bat /usr/include/asm/unistd_64.h"
22 [ "$(uname)" = "OpenBSD" ] && alias sys2
="less /usr/src/sys/kern/syscalls.master"
23 alias ob
="objdump -D -M intel"
24 alias rr
="r2 -d -c vv"
25 alias reg
="cat .scripts/reg.txt"
28 alias wgetf
="wget --tries=100 --continue --content-disposition --trust-server-names -i"
29 alias wgetw
="wget -r -l inf"
30 alias egyb
=" cd ~/downloads && python /mnt/data/dev/archived/egybest_downloader/egybest_unix.py"
33 yt
="youtube-dl -i --add-metadata"
34 alias ya
="$yt -f bestaudio"
35 alias yv4
="$yt -f 'bestvideo[height<=480]+bestaudio/best[height<=480]'"
36 alias yv7
="$yt -f 'bestvideo[height<=720]+bestaudio/best[height<=720]'"
37 alias yvp4
="yv4 -o \"%(autonumber)s-%(title)s.%(ext)s\""
38 alias yvp7
="yv7 -o \"%(autonumber)s-%(title)s.%(ext)s\""
41 [ "$(uname)" = "OpenBSD" ] && alias ls='colorls -GA' ||
alias ls='ls --color=always -A'
45 [ "$(id -u)" = 0 ] && col="9m" ||
col="24m"
46 export PS1
="\[\033[38;5;$col\]\W \033[38;5;166m\]\$(git branch --show-current 2>/dev/null)\[\033[00m\] "
50 [ -f "$1" ] && case $1 in
51 *.
tar.bz2
) tar xjf
"$1";;
52 *.
tar.gz
) tar xzf
"$1";;
53 *.
tar.xz
) tar xf
"$1";;
54 *.
tar.zst
) tar -I zstd
-xvf "$1";;
56 *.tbz2
) tar xjf
"$1";;
64 *.Z
) uncompress "$1";;
65 *) echo "'$1' cannot be extracted.";;
70 cp /mnt
/data
/dev
/openbsd_clang-format
/.clang-format .
71 clang-format
-style=file -i $1
76 echo "ibase=16;obase=A;$1" |
bc
80 echo "ibase=A;obase=16;$1" |
bc
84 gr
"$1" "$2" |
less -R
89 [ -f "$1" ] ||
[ -d "$1" ] && tar -czvf "$dir.tar.gz" -C "$1/.." "$dir"
93 [ -f "$1" ] ||
[ -d "$1" ] &&
94 find "$1" -type d
-exec chmod 700 {} \
; &&
95 find "$1" -type f
-exec chmod 600 {} \
; &&
96 chown
-R $USER "$1" && chgrp
-R $USER "$1"