# # ~/.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' alias mangadex='~/tinker/tinyscripts/md.sh' 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' #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" alias wpfx='WINEPREFIX="$(pwd)/wpfx" wine' alias wpfx2='WINEPREFIX="$(pwd)/wpfx2" wine' function update { scp -r * root@jasmine:"$(cat .update)"; } 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/; } #image shitposting function catbox { curl -F fileToUpload="@$*" -F reqtype=fileupload https://catbox.moe/user/api.php; echo ""; } alias shitpost="~/tinker/tinyscripts/shitpost.sh" function cheat { curl "cheat.sh/$*"; } #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" function fedidl { a=$(curl -sLH "Accept:application/activity+json" $1 | jq -r '.attachment[] | .url'); if [ "$2" = "-p" ]; then echo $a; else wget $a; fi; } alias att="~/tinker/fedi/get_attachments.sh" function fedii { curl -sLH "Accept:application/activity+json" $1 | jq; } 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'; } function waypon { sudo rc-service waycontainer start; WAYLAND_DISPLAY=wayland-1 waydroid show-full-ui; } #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" #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 ''; }