@kat@yarn.girlonthemoon.xyz You donāt need to change the directory first in line 11, you can just create the directory, thatās sufficient since youāre having an absolute path.
The echo
in line 13 is useless, you can simplify this to: newdir="$WD/$now"
If you reversed this line with the previous one, you could make use of the variable in the directory creation: mkdir "$newdir"
.
In line 16, pull the directory change out of the loop upfront. The loop body doesnāt modify the working directory, so no need to reset it with each cycle. In fact, you could even spare the cd
altogether when you simply tell find
where to look: find "$basedir" -type fā¦
.
I didnāt try it, but if I read the manpage correctly, you should be able to simplify line 19 as well:
-C Change to DIR before performing any operations. This option is order-sensitive, i.e. it affects all options that follow.
Hence, remove the cd
and put the -C "$WD"
as the first argument to tar
. Again, I didnāt try it. Proceed with caution.
Finally, you donāt need to specify the full path to rm
in line 21. I bet, /bin
is in your PATH
. When you removed the previous cd
from my last suggestion, the relative path that follows wonāt work anymore. So, just use the absolute path that you already have in a variable: rm -rf "$newdir"
I hope you find this tiny review a wee bit useful. :-)
@kat@yarn.girlonthemoon.xyz Tux plushie is life, Tux plushie is best friend š¤
tar
and find
were written by the devil to make sysadmins even more miserable
@kat@yarn.girlonthemoon.xyz @movq@www.uninformativ.de @prologic@twtxt.net Yeah, Iām also having them in my repertoire for ages, so Iām used to the weird command line options. From todayās perspective, theyāre not consistent with the rest of the typical shell utilities, thatās for sure.
Regarding find | grep foo
, I recommend find -name '*foo*'
, prologic. Also, I regularly use -type d
and -type f
to find directories or files.
@kat@yarn.girlonthemoon.xyz Nothing wrong with handwritten HTML. Thatās often superior to generated stuff I believe. :-)
tar
and find
were written by the devil to make sysadmins even more miserable
@movq@www.uninformativ.de Yeah I actually use sift a lot these days for most āsearchingā ā at least code and text searching. For finding files by name I still use find | grep
.
tar
and find
were written by the devil to make sysadmins even more miserable
@kat@yarn.girlonthemoon.xyz @prologic@twtxt.net Given that all these programs are super old (tar
is from the late 1970ies), while trying to retain backwards-compatibilty, Iām not surprised that the UI isnāt too great. š¤
find
has quite a few pitfalls, that is very true. At work, we donāt even use it anymore in more complex scenarios but write Python scripts instead. find
can be fast and efficient, but fewer and fewer people lack the knowledge to use it ⦠The same goes for Shell scripting in general, actually.
@kat@yarn.girlonthemoon.xyz Itās also perfectly safe to nuke your cache as well. i.e: rm data/cache*
and itās all good, things will just get rebuilt š
@kat@yarn.girlonthemoon.xyz I totally recommend zs 𤣠It powers all my sites! š https://twtxt.dev https://yarn.socia/ https://prologic.dev etc š
@prologic@twtxt.net havenāt noticed anything weird in the logs! iāll let you know if it happens again and monitor more closely though. it was def weird!
@kat@yarn.girlonthemoon.xyz Hmmm Please if this happens again, help me reproduce it. Any clues in the logs? Hmm? š§ My own pod has been running flawlessly for weeks now š
tar
and find
were written by the devil to make sysadmins even more miserable
@movq@www.uninformativ.de Same here, you do get used to things over time and build a sort-of āmuscle memoryā. But youāre right, maybe they have terrible interfaces and usage options? š¤
tar
and find
were written by the devil to make sysadmins even more miserable
@movq@www.uninformativ.de the flags are SO WEIRD AND CONFUSING especially tar
which all look keysmashed and make no sense and the order matters apparently?!?! and find
is SO SLOW and when i look at a typical command for it on stack overflow it looks like fucking regex itās EVILLLLL LMAO
tar
and find
were written by the devil to make sysadmins even more miserable
@kat@yarn.girlonthemoon.xyz Whatās wrong with them? Iāve been doing this for so long now, I donāt see the issues anymore. 𤣠(Doesnāt mean they donāt exist.)
@eldersnake@we.loveprivacy.club awww ty! itās mostly fun stuff and links to my friends :) the buttons have been revived by indie web folks and the people at neocities, itās super fun!
@bender@twtxt.net I like to self-host š¤£
@prologic@twtxt.net you are certainly a special case of a luddite. Or you like to self-punish. Or both! LOL.
@bender@twtxt.net Yeah I know š¢ Donāt have Disney+, hell I donāt have many streaming services at all really š¤£
@prologic@twtxt.net yes, @xuu@txt.sour.is was the one who mention it. Thatās on Disney+, though.
@bender@twtxt.net Ahh I see. That reminds me, I was going to start watching something someone recommended here hmmm š§
@prologic@twtxt.net LOL. It is from the Severance, AppleTV+ series. I am about to finish watching it with my kidāwell, whatās available for seeing. The series is still ongoing. I recommend it!
@bender@twtxt.net Huh? š¤
tar
and find
were written by the devil to make sysadmins even more miserable
@kat@yarn.girlonthemoon.xyz my terrible script https://bytes.4-walls.net/kat/dotfiles/src/branch/main/scripts/Scripts/tinypin-log.sh
@prologic@twtxt.net haha true ig! :ā)
@kat@yarn.girlonthemoon.xyz Ahh but youāre like one of a very few that actually own domains and do interesting things š
@bender@twtxt.net How do you explain mine then? Unless it was registered before me, then let go of and I re-registered it later? š¤
@prologic@twtxt.net I will pull the email. The year is about right.
@bender@twtxt.net Iām not sure this is accurate, if you lookup mine:
$ whois shortcircuit.net.au 2>&1 | grep -i creat
created: 1986-03-05
I think this has to be the registrarās creation date no? š¤
@lyse@lyse.isobeef.org fuck yeah!!! glad you had some fun
@movq@www.uninformativ.de OH SHIT I TOTALLY FORGOT LOL! thanks for telling me! theyāre just frontends for ultimate guitar - so these links
https://tabs.ultimate-guitar.com/tab/fifty-fifty/cupid-twin-version-chords-4667768?no_redirect
https://tabs.ultimate-guitar.com/tab/chappell-roan/good-luck-babe-chords-5191149?no_redirect
@kat@yarn.girlonthemoon.xyz These are behind a login. š¤
Thanks to @kat@yarn.girlonthemoon.xyz and her shelf I finally spent several hours in the woodshop. I wanted to build two drawers for the workbench and thought that I will complete this project in no time. Iāve been so wrong again. ;-)
I didnāt draw any plans, just measured a few times and then went to cutting a bunch of particle board leftovers at the table saw. I routed rebates on the sides, fronts and backs to lap the boxes and sink in the bottom. It turned out that having no plans was a stupid idea. I cut exactly on the lines as I calculated and measured, however, the math in my head fell apart when it eventually met reality. The bottoms are too short, so I gotta glue on some strips. Also, with the longer fronts, the sides wonāt work either, I have to fix them as well. :-D
Finally, the lid of my cyclone bucket broke when the negative pressure got too large. Oh well. It was just an old wood glue bucket, Iāve got another empty one, so I can use that lid but strengthen it first with some plywood. Something for future Lyse to deal with.
All in all, it was still good fun. Wood (haha) do it again, but at least with some sketches on paper. ;-)
@kat@yarn.girlonthemoon.xyz maybe iāll try to incorporate it into my PHP fanlisting project if i can find a use for an HTMX component
@kat@yarn.girlonthemoon.xyz i wanna play with HTMX sometime T__T no energyā¦.
@prologic@twtxt.net anubis is THE BESTTTTTTTTTTTTTT
@anth@a.9srv.net Congrats, thatās pretty cool! Quite some time, Iām impressed.
@prologic@twtxt.net Youāll sometimes find the āCreation Dateā in whois
. Our domain was registered in 2009. Woah. Thatās also been a while, crazy.
@movq@www.uninformativ.de Yup, thatās Mr. Compiler Explorer. :-)
@lyse@lyse.isobeef.org ⦠and I realized only now that thatās the guy behind godbolt.org? I never assumed āgodboltā to be a human name, more like some kind of wordplay. š„“
printf
?!)
@lyse@lyse.isobeef.org I agree with this sentiment š
printf
?!)
@prologic@twtxt.net There have always been and there will always be people who have absolutely no clue what theyāre doing. Iāve been 100% one of them when I started. Guaranteed, heaps of new SQL injections are born every single day, numbers rising.
That doesnāt justify all the WAF crap in the first place, though. In my opinion itās just a filthy plaster applied to an injected wound. The software itself must be secure. Otherwise, donāt put that shit on the internet. Probably not even operate it at all. Nowhere. Fix it or throw it in the bin.
@kat@yarn.girlonthemoon.xyz @bender@twtxt.net Hahaha! I canāt recall either, maybe even just a chisel or a knive? Iām not terribly good at it, not even close. Itās just fun. And I do it all too rarely. :-/
@aelaraji@aelaraji.com this is awesome!!!!
@terron@duque-terron.cat este gato habla Castellano, o Catalan? Esa oracion suena extranya en Castellano. Yo hubiera escrito:
āEn estos momentos, no sĆ© si le estĆ” pidiendo a un dios que libere su pueblo felino, o estĆ” mirando una paloma.ā
@kat@yarn.girlonthemoon.xyz woodworking is completely down @lyse@lyse.isobeef.org ally. You could really say that he was born with a saw in his hands. Or an axe, I donāt remember.
@movq@www.uninformativ.de a first edition signed Superman comic book, carefully folded just to fit, but not damaged enough to have lost its value?
@lyse@lyse.isobeef.org oooh thatās a good point! woodworking is scary and i donāt have much room for it but i do have SOME room in mind that could work for it⦠i feel like iād just hurt myself in the process though LOL
@kat@yarn.girlonthemoon.xyz Thatās cool. Also, looks like a fun woodworking project in case you exceed the hundred slots. :-) The plywood lap joints might be quite repetetive, but gang cutting them with a story stick or some other fixture shouldnāt be too terrible.
@movq@www.uninformativ.de Their gold teeth collection? ;-)
Thanks, @movq@www.uninformativ.de! That seems to be much easier. Itās already implemented in the Python docs as examples of recvmsg(ā¦)
and sendmsg(ā¦)
:
- https://docs.python.org/3/library/socket.html#socket.socket.recvmsg
- https://docs.python.org/3/library/socket.html#socket.socket.sendmsg
I looked at them sooo many times in order to figure out why my SCM_CREDENTIALS
sending code didnāt work. :-D
@prologic@twtxt.net Exactly. š (Texudus.)
@lyse@lyse.isobeef.org Nice! Next up: Passing file descriptors over Unix sockets. š