I’m a technical kinda guy, doing technical kinda stuff.

  • 0 Posts
  • 20 Comments
Joined 1 year ago
cake
Cake day: September 27th, 2023

help-circle

  • Blu-Ray USB drive and M-Discs is about the best you can get at present. Keep the drive unplugged when not in use, it’ll probably last 10-20 years in storage.

    Seeing as there hasn’t been much advance past Blu-ray, keep an eye out for something useful to replace it in the future, or at least get another drive when you notice them becoming scarce.




  • Dave.@aussie.zonetoLinux@lemmy.mlCompanies that use desktop Linux
    link
    fedilink
    arrow-up
    39
    arrow-down
    1
    ·
    22 days ago

    how the IT team tries to justify being locked into Microsoft, and then telling me I could potentially become a point of vulnerability

    Because they can manage and control all the windows PCs , pushing updates automatically, restricting what users can do locally and on the network, they have monitoring tools and whatever antivirus and antimalware tools they have, and are able to easily manage and deploy/remove software and associated group licensing and so on and so forth.

    Meanwhile you’re a single user of unknown (to them) capabilities that they now have to trust with the rest of their system, basically.

    The first rule of corporate IT is, “control what’s on your network”. Your PC is their concern still, but they have no effective control over it. That’s why they’re being a bit of a pain in the ass about it.



  • Have a look here at the ICMP source code in the Linux kernel at line 400. That is the ICMP reply code.

    At lines 433/434 you can see the collection of the source and destination MAC addresses from the incoming packet. The source is just lifted directly from the packet, the destination is done with a helper function that presumably looks at which interface it arrived on and returns the MAC address of that interface.

    Lines 441 onwards construct the reply packet and push it to the generic ICMP transmit function (which is a bit higher up in the source code), which then pushes it on to the network stack.

    Hope that gives you an idea of how it works internally! It’s really only a slightly more detailed version of the actual standard, there are a few checks to make sure that we are not exceeding network rate limits in the stack and etc, but it’s a quite simple bit of code.

    Added edit: it’s “simple” at this point because a lot of the work has already been done. The packet has arrived via the network stack, it has been determined to be an ICMP packet, and it was sent here to this function. There are already functions that send packets out via the network stack, so this chunk of code just builds an appropriate packet and hands it on to be sent.




  • What if I want to buy a cheese sandwich today with BTC?

    A cheese sandwich can remain the same fixed price in dollars for years, with only the relatively slow change in actual value due to inflation.

    I’ve seen BTC swing 10% in 24 hours. Does the cheese-sandwich-maker have to look up the rate this instant and calculate a spot price for me?

    Will they have more or less dollars at the end of the day, when they need to pay their bills and buy more cheese from their suppliers?

    “Just buy cheese from someone who takes BTC”, doesn’t help, it just kicks the can further down the road.

    “Just add a bit of a buffer in the price to take fluctuations into account”, means that I go buy a cheese sandwich with dollars from next door because it’s 50 cents cheaper for the same thing.

    As an investment vehicle, BTC is doing hot laps of the track (with occasional accidents), but until its volatility issues are sorted and it becomes “boring”, it’s not going anywhere as an actual currency.



  • I end up having to play twenty questions with chatgpt. For example, I’ve been asking it for code examples for ffmpeg mpeg4 encoding with C++.

    It will happily spit out completely non-working code, where the core part - feeding image frames to the encoder - works, but it doesn’t initialise or tidy up the encoding afterwards.

    Until I say, “hey this code doesn’t seem to work and creates corrupted files”, and then it’s like, “oh yeah you also need to do a bunch of other stuff, just like this”. Repeat as it slowly adds more and more pieces until finally you end up with something that actually works.

    Or it will happily dream up function names or mix python and C functions, or will refer to older APIs even when I’ve specifically said “use API version x.y” and so on and so forth.

    If I didn’t know enough about the subject already, I’d never be able to tease out the answer. So in a sense it’s a mostly useful reference, but it can’t be relied on to actually and consistently provide a result because it’s all statistics and fuzzy text generation behind the scenes, not actual knowledge.



  • The bug is the lack of documentation and that a simple unguarded command can erase all user’s data on the system.

    Also, the principle of least surprise would like a word.

    If I look at the command line arguments of a program called “systemd-tmpfiles” and one of them is called “purge” I will generally assume that option will purge temporary files.

    Now it turns out that someone decided that this program would be a simple way to do something with /home directories(*) so they included /home in the config file for the program, the file that the program reads by default when it is invoked.

    Who decided it would be a good idea for it to deal with /home?

    Wellllll…

    https://github.com/systemd/systemd/blob/main/tmpfiles.d/home.conf

    (*)I have no idea what this program is doing with /home in its config file. I will presume that there is a useful and mostly logical reason for it, and that this command line option was just an unfortunate footgun for those users who were not intimately familiar with systemd.


  • I hate how bloated the kernel is. I’d like it to fit into main memory.

    Take a copy of lspci, lsusb. Use them to build a kernel from source with only the bits you need and then make the bits you might need modules. Include your filesystem driver into the kernel and you can skip the usual initramfs stage and jump straight to your root filesystem.

    Might take a few tries, but at least it doesn’t take 18 hours to compile the kernel anymore…






  • It sounds like your sync process can create files, but not rename them afterwards.

    That long filename you’ve got now is likely the temporary name you get while the file is being transferred, once it’s fully there it usually gets renamed to what you want it to be.

    Go up one level and check the permissions for the directory the files are in. The permissions should be read-write, otherwise it’d not be able to create files in there at all, but check if the “sticky bit” is set. That stops processes from renaming files once they are made.

    Unfortunately I’m travelling at the moment, but hopefully your file manager will have a way of showing if the “sticky bit” is set for that directory.