2023-11-20 15:51:06 +11:00
|
|
|
#
|
|
|
|
# ~/.bashrc
|
|
|
|
#
|
|
|
|
|
|
|
|
# If not running interactively, don't do anything
|
|
|
|
[[ $- != *i* ]] && return
|
|
|
|
|
|
|
|
# alias ls='ls --color=auto'
|
|
|
|
# PS1='[\u@\h \W]\$ '
|
|
|
|
|
|
|
|
#jewtube-related
|
|
|
|
function yts { yt-dlp --get-title --get-duration --get-id ytsearch10:"'$*'"; }
|
|
|
|
function ytl { echo https://inv.riverside.rocks/watch?v=$1; }
|
|
|
|
function ytv { echo https://inv.riverside.rocks/watch?v=$(yt-dlp --get-id ytsearch:"'$*'"); }
|
|
|
|
function ytl2 { echo https://youtube.com/watch?v=$1; }
|
|
|
|
function vid { mpv "https://inv.riverside.rocks/latest_version?id=$1&itag=22&local=true"; }
|
|
|
|
#honorary jewtube
|
|
|
|
function nts { yt-dlp --get-title --get-duration --get-id nicosearch10:"$*"; }
|
|
|
|
|
|
|
|
#manga
|
|
|
|
alias mdesu='/home/wisknort/tinker/md/mdesu/mdesu'
|
2024-09-23 21:51:01 +10:00
|
|
|
alias mangadex='~/tinker/md/md.sh'
|
2024-09-23 21:44:11 +10:00
|
|
|
alias md='mangadex generate_link'
|
|
|
|
alias mds='mangadex search'
|
|
|
|
alias mdi='mangadex information'
|
|
|
|
alias mdc='mangadex chapter_information'
|
|
|
|
alias mdl='mangadex download'
|
|
|
|
alias mdu='mangadex update_from_v3_to_v5'
|
2023-11-20 15:51:06 +11:00
|
|
|
|
|
|
|
#strong utils
|
|
|
|
source ~/tinker/tinyscripts/creds_getter.sh
|
|
|
|
function lyrics { python ~/tinker/lyrics-fetcher/getlyrics.py $@; }
|
|
|
|
function pulsemagix { ~/pulsemagix.sh $*; }
|
|
|
|
alias search=~/tinker/tinyscripts/search.sh
|
|
|
|
alias gitmk="git push -o repo.private=false -u master master"
|
2024-03-11 18:18:46 +11:00
|
|
|
alias wpfx='WINEPREFIX="$(pwd)/wpfx" wine'
|
2024-05-31 16:54:56 +10:00
|
|
|
alias wpfx2='WINEPREFIX="$(pwd)/wpfx2" wine'
|
2023-11-20 15:51:06 +11:00
|
|
|
function update { scp -r * root@jasmine:"$(cat .update)"; }
|
2024-05-31 16:54:56 +10:00
|
|
|
function makepkgi { a="$(pwd)"; mkdir -p "/tmp/negros/src/$(basename "$a")"; cp PKGBUILD /tmp/negros/; cp -r ./. "/tmp/negros/src/$(basename "$a")/"; cd /tmp/negros/; rm "src/$(basename "$a")/PKGBUILD" "src/$(basename "$a")"/*.tar.zst; makepkg -${1:-R}; cp *.tar.zst "$a"; cd "$a"; rm -rf /tmp/negros/; }
|
2023-11-20 15:51:06 +11:00
|
|
|
#image shitposting
|
2024-12-21 16:14:48 +11:00
|
|
|
function catbox
|
|
|
|
{
|
|
|
|
if [ "$1" = '-t' ]; then
|
|
|
|
shift
|
|
|
|
curl https://litterbox.catbox.moe/resources/internals/api.php -F time=12h -F reqtype="@$*"
|
|
|
|
else
|
|
|
|
curl -F fileToUpload="@$*" -F reqtype=fileupload https://catbox.moe/user/api.php
|
|
|
|
fi
|
|
|
|
echo ""
|
|
|
|
}
|
2023-11-20 15:51:06 +11:00
|
|
|
alias shitpost="~/tinker/tinyscripts/shitpost.sh"
|
2024-09-23 21:44:11 +10:00
|
|
|
function cheat { curl "cheat.sh/$*"; }
|
2024-12-21 16:14:48 +11:00
|
|
|
function unroll { magick $1 -layers CompareAny blah.png; }
|
2023-11-20 15:51:06 +11:00
|
|
|
|
|
|
|
#fun
|
|
|
|
function space { python -c "print(\" \".join(\"$*\"))"; }
|
|
|
|
function cap { python -c "a=\"$*\"; print(\"\".join([a[i].lower() if i%2 else a[i].upper() for i in range(len(a))]))"; }
|
|
|
|
function vandalise { rev <<< $*; }
|
|
|
|
function xyzzy { echo "Nothing happens."; }
|
|
|
|
alias pentest="curl -H 'user-agent:rakkatakkamuthafakka'"
|
|
|
|
|
|
|
|
#fedi
|
|
|
|
alias fedifind="python ~/tinker/fedi/fedi_finder.py -c ~/tinker/fedi/misc/userids"
|
2023-12-28 19:07:15 +11:00
|
|
|
function fedidl { a=$(curl -sLH "Accept:application/activity+json" $1 | jq -r '.attachment[] | .url'); if [ "$2" = "-p" ]; then echo $a; else wget $a; fi; }
|
2023-11-20 15:51:06 +11:00
|
|
|
alias att="~/tinker/fedi/get_attachments.sh"
|
2023-12-28 19:07:15 +11:00
|
|
|
function fedii { curl -sLH "Accept:application/activity+json" $1 | jq; }
|
2023-11-20 15:51:06 +11:00
|
|
|
function mxc { [ -z $INSTANCE ] && creds matrix harpy; echo "https://$INSTANCE/_matrix/media/v3/download/$*"; }
|
|
|
|
|
|
|
|
#low-frequency
|
|
|
|
eval "$(thefuck --alias)"
|
|
|
|
alias dedupe='python ~/deduper.py'
|
|
|
|
alias tra="traceroute -6"
|
|
|
|
function tapas { wget $(curl $1 | grep -oE data-src=\".+\" | grep -oE h.+g); }
|
|
|
|
function mnotif { [ -z $1 ] && jq -r 'keys | .[]' < ~/tinker/matrix/matrix.conf; [ -z $1 ] || curl https://$(jq -r ".$1.instance" < ~/tinker/matrix/matrix.conf)/_matrix/client/r0/notifications -H "Authorization:Bearer $(jq -r ".$1.access_token" < ~/tinker/matrix/matrix.conf)" | jq '.notifications | .[] | (.room_id+", "+(.ts | tostring)+", "+.event.sender+": "+.event.content.body),""'; }
|
|
|
|
function tlcard { a="$*"; read oid lang <<< "$(curl -s "https://api.scryfall.com/cards/named?fuzzy=${a/ /+}" | jq -r '.oracle_id+" "+(["en","ja"]-[.lang])[0]')"; curl -s "https://api.scryfall.com/cards/search?order=released&q=oracleid:$oid+lang:$lang&unique=prints" | jq -r '.data[0] | .printed_name // .name, .printed_type_line // .type_line, .printed_text // .oracle_text'; }
|
2024-05-31 16:54:56 +10:00
|
|
|
function waypon { sudo rc-service waycontainer start; WAYLAND_DISPLAY=wayland-1 waydroid show-full-ui; }
|
2023-11-20 15:51:06 +11:00
|
|
|
|
|
|
|
#deprecated
|
|
|
|
#function nhen { echo https://nhentai.net/g/$1; }
|
|
|
|
#alias genyprox="mitmproxy --mode socks5 --listen-port 8050"
|
|
|
|
#alias genyprox2="mitmproxy --mode socks5 --listen-port 8051"
|
|
|
|
#alias ztr="sudo rc-service zerotier-one restart"
|
2023-12-28 19:07:15 +11:00
|
|
|
#function zino { curl -iX PUT 'http://conduit.rakka.tk/_matrix/client/r0/rooms/!bXiARHQYqPBOdJRzTd:matrix.org/send/m.room.message/'$1 -H "Authorization:Bearer $TOKE" --json "{\"msgtype\":\"m.text\",\"body\":\"$(cat)\"}" && echo ''; }
|