Interests: programming, video games, anime, music composition

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

  • 0 Posts
  • 131 Comments
Joined 2 years ago
cake
Cake day: November 27th, 2023

help-circle




  • 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…)





  • I went to a lot of different schools growing up. Some of them were not-very-well-funded public schools, but others were international schools for expats and private US schools – some of which might qualify. Most of the schools I went to had a cafeteria with a typical “go through the line with a tray and get whatever they cooked that day in bulk” kind of system. Some of them also had a store where you could buy snacks, prepackaged sandwiches, and such. I remember bringing lunch from home a lot – either sandwiches or leftovers from dinner the previous night, usually. One of the schools was so small it didn’t even have a real cafeteria for us and all the students (6th~8th grade in the US system) brought lunch from home and ate on fold up chairs in the multi-purpose room every day. I also went to a boarding school for a couple years. That one had a cafeteria system too – but the students were pressed into working on a rotation schedule (wiping down tables, cleaning dishes, and such – I don’t remember preparing any of the food). I don’t recall anything particularly outstanding one way or the other about the regular lunches there, but that one had periodic formal dinners (once a month or so, IIRC) where I had to get dressed up (e.g. put on a tie) and they broke us up into small groups of students and teachers. I remember those being stressful, but also having better than average food.







  • 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.



  • If it actually worked reliably enough, it would be like having a dedicated, knowledgeable, and infinitely patient tutor that you can ask questions to and interactively explore a subject with who can adapt their explanations specifically to your way of thinking. i.e. it would understand not just the subject matter but also you. That would help facilitate knowledge transfer and could reduce the tedium of trying to make sense of something that’s not explained well enough for you to understand (as written) with your current background knowledge but which you are capable of understanding.



  • I had similar problems and couldn’t figure out how to get out of that cycle before it ended up with me having panic attacks, and anxiety/depression bad enough to be put on SSRIs. If you can’t relax and feel tense all the time, that is a serious issue! Nip it in the bud if you can.

    What I eventually figured out is that I needed separation between my work and my personal time – and yes, those kinds of personal projects are still work even if you’re just doing them for yourself.

    Decide how long you want to dedicate to working – then hold yourself to that. Like, actually write down the start and end times you worked so that you can prove to yourself that you really put in the effort. I use plain text files on my computer for this; do what works for you. After you’ve put in the time you committed to, you are OFF THE CLOCK. Stop working – even if you have to force yourself – and go do something else. Without guilt.


  • 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?