Skip Navigation

InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)H
Posts
24
Comments
925
Joined
2 yr. ago

  • He's an asshole

  • I also came to post "must be nice".

    Rich assholes

  • Is WordPress running in docker or on the host is?

    What you could do is set up and NFS or smb share on the ote other server, move all the media to that share on the file server and then mount the NFS/b share to the folder on the WordPress server.

    Set up the NFS/smb share to mount at boot. WordPress shoudnt wvwn notice the difference.

  • I've been thinking about giving fedora atomic sway a spin.

  • Been on Linux only for a couple years now. My biggest complaint is how terrible the trackpad experience is. The upside is I have a pretty keyboard centric workflow (tiling window manager), so I dont have to use the trackpad too much, but wgeb I do its not a great experience.

    Fwiw arch (BTW), with hyprland on a framework 13.

  • They're actually, finally working on a sequel!

  • Hello fellow dull midwestern man. I've been needing to put some up on my roof but the ice dams haven't melted yet.

  • Excuse me, it's microslop. ;)

  • That's a fair point.

  • Exactly! That question was later in the "test", and my eyes were already rolling so hard. When I got that question I was dumbfounded by how stupid it is

  • I answered it "No", because it's so dumb. Back then I needed the job so I made the compromise, and I was so happy when I was able to leave that job.

  • Jesus. That's brutal. I'm not in the software world and have never experienced an process like you just described.

    I do remember feeling similarly disgusted years ago applying for a retail job where I had to do an insulting "phone" interview/test where a computer asked me a bunch (like 20-30) of dumb fucking questions like:

    • "Have you ever stolen money from your job?"
    • "Do you think it's okay to come to work drunk?"
    • "If you put money in a vending machine and got two items instead of one, would you put additional money in for the second item?"

    That last question very specifically is one I'll always remember because of how incredibly stupid and insulting it is.

    I hope you find work at a company that respects you as a human being and as a professional.

  • I'm not gonna yuck anyone's yum. If a person likes these movies (as clearly, lots of people do), good for them. I saw the first avatar in the theater however the fuck long ago that movie came out now. It was pretty, and as you say, boring as hell. It'll be the only Avatar film I ever see.

  • I've been mostly disinterested in Marvel movies since Endgame. I've enjoyed the Spider-Man movies with Holland, but even though Spidey is generally my favorite super-hero character, as of now I don't even care about the next Spider-Man.

    If you enjoy em, great. I mostly don't care anymore.

  • I just finished Nova by Samuel Delaney. I did NOT like it. Would have abandoned it if it wasn't our book club book

    Also listening to Off Armageddon Reed by David Weber (Safehold book 01), and reading The Player of Gamer by Iain Banks (Culture book 02), and quite enjoying both.

  • I didn't realize that. Thanks for pointing that out!

  • It would not, as @Quibblekrust@thelemmy.club explained in their comment (which I neglected to include in my explanation), Bash uses a special variable called IFS when executing for loops like this. IFS stands for Input Field Separators, and is a list of one of each type of whitespace (tab, space, and newline), and uses these as separators automatically.

    So instead of taking that whole ls output as one string of text, the for loop automatically separates it into an iterable list of strings using the newline separator.

  • I was also a teach for a number of years! Hello fellow teacher. :)

    I agree. Bash, and GNU/Linux in general is amazing. My recent foray has been into Python, and I'm having an utter blast writing code and learning.

  • You've got a few things going on to be broken down here.

    And forgive me if anything I say here seems condescending, it's not meant to be, I just like to be very explanatory with things like this and to assume the reader may not know anything about anything. (Not as an insult, but simply as a gap in knowledge).

    Also, while I'm proficient at Bash, I'm no expert.

    LIST=$(ls): Here you've stored the output of the ls command to the variable LIST, which gives you a list of items in the given directory, in this case, whichever directory the command is run from. It's also a good idea to quote the variable assignment like this: "$(ls)".

    for i in $LIST;: This is the first part of the for loop statement, which is an iterator, meaning, it will loop or iterate over every item in the given variable/parameter/group of iterable items.

    The i here, as you said could be anything. You could say for file in $LIST; or for item in $LIST;. It doesn't matter, because it's just a variable name that you are using in the first part of the for statement.

    So what bash will do with this is loop over the list, and take each item in the list, and assign it to the variable i, which will allow you do act upon that single item by calling the variable i in some other commands.

    do echo "I found one!";: This is the next part of the for loop, which is the instruction set to be executed inside the for loop. Here is where you can act upon the items in your list that have been assigned to the variable i.

    In your case, you're just printing a statement to stdout (standard out), that says, "I found one!"

    It's like saying, for each item in this list, print "I found one!"

    So if there are 20 items in the list, it will print that statement 20 times.

    However, maybe you want to print the item itself as part of a statement. So instead of "I found one!", you could do something like:

    do echo "I found $i!"

    Which then would print "I found some-filename-or-directory-here!" for each item in your list.

    done: Finally, the done statement tells bash that this is the end of the for loop. So any commands after the done statement will only run once the for loop has iterated over all items in the list and executed the commands inside the for loop for each item on the list.

    A couple of notes:

    The ; is used as a command separator or terminator. So bash knows to first run LIST=$(ls) before it attempts to run whatever the next command might be.

    In bash, it's good practice to always quote your variables like so: for i in "$LIST";. This is to avoid errors for characters that might need escaping like whitespace, backslashes, and other special characters.

    With that in mind, if you're running a command like echo "I found $i!", you don't need to quote the variable again, because it's already inside a quote set.

    Further, it's not absolutely necessary, but it can also be a good idea to also enclose all of your variables in {}, so whenever you use a variable, you'd do something like: "${LIST}"

    This not only more clearly identifies variables in your bash scripts/commands, but is necessary when using bash's parameter expansion, which is pretty great.

  • Programming @programming.dev

    Looking for feedback on a python class definition

  • Programming @programming.dev

    Kinda proud of this python script I wrote

  • Music @lemmy.world

    VISIONS OF ATLANTIS - Hellfire

  • Linux @lemmy.ml

    Question About Bash Command Grouping Behavior in Script vs CLI

  • Linux @lemmy.ml

    Happy with my bash progress!

  • Dull Men's Club @lemmy.world

    Old oven died. Installed the new one today

  • Linux @lemmy.ml

    Question: Can I use dd to clone my luks encrypted lvm os drive?

  • Dull Men's Club @lemmy.world

    Wife and I made a cherry cheesecake

  • Linux @lemmy.ml

    In vim I can't type the ~ character

  • Linux @lemmy.world

    FIXED: Help Fixing VPN Connection When Resuming From Suspend

  • FoodPorn @lemmy.world

    I made Loukomedes (Greek donuts)

  • Linux @lemmy.ml

    Perl rename command works at cli but not in alias or bash script

  • Programming @programming.dev

    Book recommendations to learn programming fundamentals

  • Linux @lemmy.ml

    Edit: it's CentOS 7 (original: CentOS 3 on a self checkout?!?)

  • Linux @lemmy.ml

    Requesting Help with txg_sync Error I Can't Diagnose

  • Linux @lemmy.ml

    Kicked macOS to the Curb and Installed Asahi Fedora Gnome

  • FoodPorn @lemmy.world

    Spiced Lamb Taco on Fresh Naan

  • FoodPorn @lemmy.world

    Chicken Gyros

  • cats @lemmy.world

    My boy Brewster lounging

  • cats @lemmy.world

    Our very dramatic girl GG in her floofy bed.