This commit is contained in:
Zergling_man 2024-05-31 16:54:56 +10:00
parent b69d64aa26
commit ca76215a61
2 changed files with 26 additions and 2 deletions

View File

@ -21,7 +21,7 @@ function nts { yt-dlp --get-title --get-duration --get-id nicosearch10:"$*"; }
function md { echo https://mangadex.org/title/$1; } function md { echo https://mangadex.org/title/$1; }
function mds { curl -s "https://api.mangadex.org/manga?contentRating[]=safe&contentRating[]=suggestive&contentRating[]=erotica&contentRating[]=pornographic&title=$(sed s/\ /+/g <<< $*)" | jq ".data | .[] | .id,.attributes.title.en?,.attributes.description.en?,\"\""; } function mds { curl -s "https://api.mangadex.org/manga?contentRating[]=safe&contentRating[]=suggestive&contentRating[]=erotica&contentRating[]=pornographic&title=$(sed s/\ /+/g <<< $*)" | jq ".data | .[] | .id,.attributes.title.en?,.attributes.description.en?,\"\""; }
function mdi { curl -s "https://api.mangadex.org/manga/$1" | jq ".data | .id,.attributes.title.en?,.attributes.description.en?,\"\""; } function mdi { curl -s "https://api.mangadex.org/manga/$1" | jq ".data | .id,.attributes.title.en?,.attributes.description.en?,\"\""; }
function mdc { mdi $(curl -s "https://api.mangadex.org/chapter/$1" | jq -r '.data.relationships[] | select (.type=="manga").id'); } function mdc { inf=$(curl -s "https://api.mangadex.org/chapter/$1"); jq '.data.attributes | .volume+" "+.chapter' <<< "$inf"; mdi $(jq -r '.data.relationships[] | select (.type=="manga").id' <<< "$inf"); }
alias mdesu='/home/wisknort/tinker/md/mdesu/mdesu' alias mdesu='/home/wisknort/tinker/md/mdesu/mdesu'
alias mdl="~/tinker/md/dler.py" alias mdl="~/tinker/md/dler.py"
function mdu { curl -si https://mangadex.org/title/$1 | grep -i location; } function mdu { curl -si https://mangadex.org/title/$1 | grep -i location; }
@ -33,8 +33,9 @@ function pulsemagix { ~/pulsemagix.sh $*; }
alias search=~/tinker/tinyscripts/search.sh alias search=~/tinker/tinyscripts/search.sh
alias gitmk="git push -o repo.private=false -u master master" alias gitmk="git push -o repo.private=false -u master master"
alias wpfx='WINEPREFIX="$(pwd)/wpfx" wine' alias wpfx='WINEPREFIX="$(pwd)/wpfx" wine'
alias wpfx2='WINEPREFIX="$(pwd)/wpfx2" wine'
function update { scp -r * root@jasmine:"$(cat .update)"; } 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"; makepkg -${1:-R}; cp *.tar.zst "$a"; cd "$a"; rm -rf /tmp/negros/; } 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 #image shitposting
function catbox { curl -F fileToUpload="@$*" -F reqtype=fileupload https://catbox.moe/user/api.php; echo ""; } function catbox { curl -F fileToUpload="@$*" -F reqtype=fileupload https://catbox.moe/user/api.php; echo ""; }
alias shitpost="~/tinker/tinyscripts/shitpost.sh" alias shitpost="~/tinker/tinyscripts/shitpost.sh"
@ -60,6 +61,7 @@ alias tra="traceroute -6"
function tapas { wget $(curl $1 | grep -oE data-src=\".+\" | grep -oE h.+g); } 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 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 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 #deprecated
#function nhen { echo https://nhentai.net/g/$1; } #function nhen { echo https://nhentai.net/g/$1; }

22
updateLE.sh Executable file
View File

@ -0,0 +1,22 @@
#!/bin/bash
function ch { chown $1 $3; chmod $2 $3; }
./mkcerts.sh LE get_cert nuconf rakka.au harpy.faith botegirl.parts
cp -f out.crt /srv/http/certs/fag.crt
ch http:http 644 /srv/http/certs/fag.crt
cp -f out.crt /etc/prosody/certs/harpy.faith/fullchain.pem
ch prosody:jabber 600 /etc/prosody/certs/harpy.faith/fullchain.pem
cp -f out.crt /srv/email/certs/fag.crt
ch root:smtpd 640 /srv/email/certs/fag.crt
./mkcerts.sh LE get_cert nerdconf nerdshope.au
cp -f out.crt /srv/http/certs/nerd.crt
ch http:http 644 /srv/http/certs/nerd.crt
cp -f out.crt /srv/email/certs/nerd.crt
ch root:smtpd 640 /srv/email/certs/nerd.crt
systemctl reload nginx
systemctl reload prosody
systemctl restart smtpd
systemctl reload dovecot