From ca76215a61968d3fb9e63352cfac6291d7cccb6e Mon Sep 17 00:00:00 2001 From: Zergling_man Date: Fri, 31 May 2024 16:54:56 +1000 Subject: [PATCH] whatever --- .bashrc | 6 ++++-- updateLE.sh | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100755 updateLE.sh diff --git a/.bashrc b/.bashrc index f5bac90..841a66c 100644 --- a/.bashrc +++ b/.bashrc @@ -21,7 +21,7 @@ function nts { yt-dlp --get-title --get-duration --get-id nicosearch10:"$*"; } 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 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 mdl="~/tinker/md/dler.py" 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 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"; 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 function catbox { curl -F fileToUpload="@$*" -F reqtype=fileupload https://catbox.moe/user/api.php; echo ""; } 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 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; } diff --git a/updateLE.sh b/updateLE.sh new file mode 100755 index 0000000..f68f38a --- /dev/null +++ b/updateLE.sh @@ -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