Commit ce4265f
chasinglightning
·
2025-07-26 20:10:40 -0400 EDT
parent c1ae38e
bashrc cleanup
2 files changed,
+15,
-15
+7,
-7
| ... | ... | @@ -25,11 +25,6 @@ cdmess() { | |
| 25 | 25 | # don't log commands that start with a space | |
| 26 | 26 | export HISTCONTROL=ignorespace | |
| 27 | 27 | ||
| 28 | - | # fuzzy find/search thru (recent) bash history | |
| 29 | - | hist() { | |
| 30 | - | cat ~/.bash_history | fzf | sh | |
| 31 | - | } | |
| 32 | - | ||
| 33 | 28 | # catppuccin colors for fzf | |
| 34 | 29 | export FZF_DEFAULT_OPTS=" \ | |
| 35 | 30 | --color=spinner:#F2D5CF,hl:#E78284 \ |
| ... | ... | @@ -55,7 +50,7 @@ alias weatherlg=wttrlg | |
| 55 | 50 | alias sun="daylight --short --timezone='America/New_York' | lolcat" | |
| 56 | 51 | ||
| 57 | 52 | # print internal & external IPs | |
| 58 | - | function whatip() { | |
| 53 | + | whatip() { | |
| 59 | 54 | # internal | |
| 60 | 55 | echo -n "internal IP: " | lolcat -p 0.7; hostname -I | awk '{print $1}' | |
| 61 | 56 | # external |
| ... | ... | @@ -63,7 +58,7 @@ function whatip() { | |
| 63 | 58 | } | |
| 64 | 59 | ||
| 65 | 60 | # password generator. takes input for password length by number | |
| 66 | - | function passgen() { | |
| 61 | + | passgen() { | |
| 67 | 62 | PASSLENGTH=$(gum input --placeholder "type a number") | |
| 68 | 63 | date +%s | sha256sum | base64 | head -c $PASSLENGTH ; echo | |
| 69 | 64 | } |
| ... | ... | @@ -74,3 +69,8 @@ alias pusheu="git push bytes main && cd /home/kat/Documents/Git/-mine/eunoia-ast | |
| 74 | 69 | # vpn split tunnel aliases based on a small script @ ~/.local/bin/mvpn | |
| 75 | 70 | alias mftp="mvpn filezilla" | |
| 76 | 71 | alias mterm="mvpn kitty" | |
| 72 | + | ||
| 73 | + | # quickly look up a program on cheat.sh | |
| 74 | + | cheat() { | |
| 75 | + | curl cheat.sh/"$1" | |
| 76 | + | } |
+8,
-8
| ... | ... | @@ -54,11 +54,6 @@ cdmess() { | |
| 54 | 54 | cd "$(mktemp -d -p "${today_tmpdir}" XXXX)" | |
| 55 | 55 | } | |
| 56 | 56 | ||
| 57 | - | # fuzzy find/search thru (recent) bash history | |
| 58 | - | hist() { | |
| 59 | - | cat ~/.bash_history | fzf | sh | |
| 60 | - | } | |
| 61 | - | ||
| 62 | 57 | # get a random free port. this is useful for my | |
| 63 | 58 | # insane sysadmin website woman adventures | |
| 64 | 59 | portfree() { |
| ... | ... | @@ -72,7 +67,7 @@ portfree() { | |
| 72 | 67 | } | |
| 73 | 68 | ||
| 74 | 69 | # from http://dotfiles.org/~pseup/.bashrc | |
| 75 | - | function extract() { | |
| 70 | + | extract() { | |
| 76 | 71 | if [ -f $1 ] ; then | |
| 77 | 72 | case $1 in | |
| 78 | 73 | *.tar.bz2) tar xjf $1 ;; |
| ... | ... | @@ -94,7 +89,7 @@ function extract() { | |
| 94 | 89 | } | |
| 95 | 90 | ||
| 96 | 91 | # print internal & external IPs | |
| 97 | - | function whatip() { | |
| 92 | + | whatip() { | |
| 98 | 93 | # internal | |
| 99 | 94 | echo -n "internal IP: " | lolcat -p 0.7; hostname -I | awk '{print $1}' | |
| 100 | 95 | # external |
| ... | ... | @@ -102,7 +97,7 @@ function whatip() { | |
| 102 | 97 | } | |
| 103 | 98 | ||
| 104 | 99 | # password generator. takes input for password length by number | |
| 105 | - | function passgen() { | |
| 100 | + | passgen() { | |
| 106 | 101 | PASSLENGTH=$(gum input --placeholder "type a number") | |
| 107 | 102 | date +%s | sha256sum | base64 | head -c $PASSLENGTH ; echo | |
| 108 | 103 | } |
| ... | ... | @@ -114,3 +109,8 @@ alias gmine="cd /home/kat/Documents/Code/Git/-mine" | |
| 114 | 109 | alias pusheu="git push bytes main && cd /home/kat/Documents/Code/Git/-mine/astro-eunoia/eunoia/src/utils && node git-changelog.js" | |
| 115 | 110 | ||
| 116 | 111 | alias iconsubfol="find . -mindepth 2 -type f -print -exec mv {} . \;" | |
| 112 | + | ||
| 113 | + | # quickly look up a program on cheat.sh | |
| 114 | + | cheat() { | |
| 115 | + | curl cheat.sh/"$1" | |
| 116 | + | } |