Interests: programming, video games, anime, music composition

I used to be on kbin as e0qdk@kbin.social before it broke down.

  • 3 posts
  • 66 comments
Joined 3 years ago
Cake day: November 27th, 2023
  • Should be trivial to set up something like that if you’ve got parts you want to work with. Any desktop with an automatic background switcher should be able to cycle through images in a directory you specify on a timer. Set up your favorite remote access software (SSH, Samba, NFS …) and you’re done. If you want more control over the behavior, you could script up something custom with a little more effort – but it’s still not particularly hard to implement something like that.

    Watch out for burn in on the screen if you’re leaving it on all the time.

  • Are you trying to write your own parsers for these formats or something like that? I don’t think I really get the issue you’re running into.

    If you want to just display formatted text (esp. including HTML), you can use a browser (either as an embedded widget in a custom app, via an Electron app, or in a regular browser via an HTTP server) and generate the output on the fly. You don’t need to save the converted output if it’s fast enough to generate…

  • the contents of these tickets need to be encrypted at rest

    If that’s the actual requirement – i.e encrypted at rest – then store the database on an encrypted volume instead of encrypting the messages themselves inside the DB. It will likely be more performant, and much, much easier to both implement and maintain while still providing good security.

  • Assume an unlimited budget for now, I just want to know what’s out there.

    I mean, if you’re willing to pay the price of a car per SSD they go up to at least 122TB density per drive… (e.g. Solidigm SBFPF2BV0P12001 D5-P5336 – $16K~$20K depending on supplier from a quick search)

    I don’t actually recommend that for personal use, but since you were curious about what’s out there, there’s some absolutely crazy shit in enterprise server gear if you have deep enough pockets.

  • Are you doing anything like network mounts? I’ve had freezes happen when home was mounted remotely. I’ve also had freezes before – though not recently – when doing extremely intensive I/O operations. I’ve also seen it with failing hardware, but I don’t remember what hardware was failing specifically (if we ever found out – that was an always-on display system at work, and we might have just replaced it since it was ancient at that point…).

    See if you can switch from GUI to console (either on the system or SSH-ing in). Usually the Ctrl-Alt-Fn keys switch between GUI and full screen console modes if you’re physically there to try it. If you can get in, you might be able to get some insight into what’s going on from logs, top, etc. while it’s happening.

  • When I was a kid, we had a class on Logo in, I think, 4th grade? (It was either that or 5th grade.) It wasn’t particularly hard to make various geometric drawings with it, but it also wasn’t clear how to use it to do anything beyond that.

    I used to tinker with Visual Basic on the school’s computer lab at recess sometimes around then. One of the people who ran the lab showed me just enough to try to make a calculator UI (e.g. push number buttons and have it add numbers to the display) but didn’t really explain the principles enough for me to get further than that. (I think he loaned me a book on BASIC that I tried to read on the school bus, but I couldn’t get very far with it at that age.) I ran into a macro virus back then as well, and I was able to understand the logic for erasing files on a particular date when it was pointed out, but I wasn’t able to make something like that or analyze it myself at that age.

    I also tinkered with HyperCard and some other creative software at home at around that age. I did not understand HyperTalk but could do a few simple things. I also stumbled into AppleScript but didn’t understand it. I think I recorded macros with it, and tried to modify what it spat out without much success. I remember running into something about timezone conversion that was really cryptic to me as a kid – that might have been the first time I encountered the term “GMT”? There’s a lot of little things like that which will trip up a young beginner…

    I think I also checked out a book on Java from the library that had a CD-ROM with the compiler on it somewhere in that 4th~6th grade age range (don’t remember more specifically when) – I was definitely too young to for that. I was able to install the software, type in a program from the book, and make it run but I wasn’t able to do anything beyond that with it and it was too tedious for me to persevere through the cryptic parts when I was that young.

    Somewhere around 5th ~ 6th grade I found Game Maker and taught myself that by tinkering with the sample games. For example, by making alternative level layouts for the Pac-Man clone and adding in some simple things like one-way teleporters. I used the drag and drop interface at that age with one of the really early versions before the 4.0 UI re-design – it was a lot more approachable as a beginner, IMO, before that redesign. (With the changes it was better for me as a hobbyist as I got older though.) I eventually taught myself how to use its scripting language through a mixture of reading the manual and trial-and-error. The manual didn’t explain the basics of programming very well, but the reference documentation for it was easy enough to understand that once I got a handle on the basics I could do a lot with it. I’m not sure how old I was when I got a good handle on it. Maybe 7th or 8th grade? I was able to make some fairly complex things from scratch by 9th grade and taught myself C++ in high school.

    I definitely could’ve learned a lot more conceptually earlier if I’d had more direct mentoring from someone who could code; I had to figure out a lot by trial and error. My knowledge of math, reading ability, etc. limited my ability to self-teach from books. People around me were also rarely able to answer questions when I hit something above my expected grade level (e.g. I remember asking what “sigma” meant to a math teacher in 7th grade after encountering it in a book and she didn’t really understand my question and told me it was another variable like x instead of recognizing that I was asking about summations but didn’t know that word yet… I eventually made the connection between it and for loops but I could’ve understood it then if I’d had the vocabulary to ask the right questions or had the sample text handy when I asked…) In retrospect, I’m surprised at how bad my teachers in high school were when I tried to get help with figuring out how to move things in circles in a game I was writing – that was all just basic trig.

    I guess to summarize: if they’re motivated, yeah, you can get a surprisingly long way very young.

  • Here’s one of mine. I got annoyed at the complexity of other command line spellcheckers I tried and replaced them with this simple python script for when I just want to check if a single word is correct:

    #!/usr/bin/env python3
    
    import sys
    
    try:
      query = sys.argv[1].lower()
    except Exception:
      print("Usage: spellcheck <word>")
      exit(1)
    
    with open("/usr/share/dict/words") as f:
      words = f.readlines()
    
    words = [x.strip().lower() for x in words if len(x.strip()) > 0]
    
    if not query in words:
      print("Not in dictionary -- probably a typo")
      exit(1)
    else:
      print("OK")
      exit(0)
    
  • I just ssh in and use the remote computer’s shell (typical bash on the remote side via gnome-terminal on my local Mint system) or mount a remote directory (via sftp) if I want to use a GUI editor. Not sure what hoops you have to jump through on Mac since I don’t use it these days. I’d assume you can ssh into a remote system from Mac’s default terminal app still? (I learned a bunch of Unix basics on OS X in a class ~20 years ago; it worked back then, at least…)

  • There’s something else going on there besides base64 encoding of the URL – possibly they have some binary tracking data or other crap that only makes sense to the creator of the link.

    It’s not hard to write a small Python script that gets what you want out of a URL like that though. Here’s one that works with your sample link:

    #!/usr/bin/env python3
    
    import base64
    import binascii
    import itertools
    import string
    import sys
    
    input_url = sys.argv[1]
    parts = input_url.split("/")
      
    for chunk in itertools.accumulate(reversed(parts), lambda b,a: "/".join([a,b])):
      try:
        text = base64.b64decode(chunk).decode("ascii", errors="ignore")
        clean = "".join(itertools.takewhile(lambda x: x in string.printable, text))
        print(clean)
      except binascii.Error:
        continue
    

    Save that to a file like decode.py and then you can you run it on the command line like python3 ./decode.py 'YOUR-LINK-HERE'

    e.g.

    $ python3 ./decode.py 'https://link.sfchronicle.com/external/41488169.38548/aHR0cHM6Ly93d3cuaG90ZG9nYmlsbHMuY29tL2hhbWJ1cmdlci1tb2xkcy9idXJnZXItZG9nLW1vbGQ_c2lkPTY4MTNkMTljYzM0ZWJjZTE4NDA1ZGVjYSZzcz1QJnN0X3JpZD1udWxsJnV0bV9zb3VyY2U9bmV3c2xldHRlciZ1dG1fbWVkaXVtPWVtYWlsJnV0bV90ZXJtPWJyaWVmaW5nJnV0bV9jYW1wYWlnbj1zZmNfYml0ZWN1cmlvdXM/6813d19cc34ebce18405decaB7ef84e41'
    https://www.hotdogbills.com/hamburger-molds/burger-dog-mold
    

    This script works by spitting the URL at ‘/’ characters and then recombining the parts (right-to-left) and checking if that chunk of text can be base64 decoded successfully. If it does, it then takes any printable ASCII characters at the start of the string and outputs it (to clean up the garbage characters at the end). If there’s more than one possible valid interpretation as base64 it will print them all as it finds them.

  • Nginx is running in Docker

    Are you launching the container with the correct ports exposed? You generally cannot make connections into a container from the outside unless you explicitly tell Docker that you want it to allow that to happen… i.e. assuming you want a simple one-to-one mapping for HTTP and HTTPS standard ports are you passing something like -p 80:80 -p 443:443 to docker run on the command line, adding the appropriate ports in your compose file, or doing something similar with another tool for bringing the container up?

  • I’ve put drives into standby mode with the gnome disks GUI tool on my regular desktop when they were being noisy and I wanted some peace for a while. If the drive was mounted before I put it to sleep, trying to access something on the disk will cause it to spin back up.