Interests: programming, video games, anime, music composition

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

  • 1 Post
  • 64 Comments
Joined 1 year ago
cake
Cake day: November 27th, 2023

help-circle
rss

  • Thanks. I’m still learning both Go and the codebases involved. I’m pretty limited on free time where I’ve got both large enough blocks of time and energy to concentrate effectively on this. I’m also not very enthusiastic about taking on the administrative aspects of running an open source project – I’m only really interested in keeping a JS-free version of Lemmy usable – so contributing changes to a common community fork you’ve already got up and running sounds good to me!

    I do have some specific issues in mind that I’d like to implement fixes for once I’m up to speed. In particular:

    • There is improper filtering when a user submits a comment which results in certain text being stripped from the message instead of escaped properly. I’m not sure if this is an issue in mlmym itself or one of the libraries it uses, but I’d like to track it down and get it fixed.
    • Federated image links to non-lemmy websites sometimes show up as image_proxy links from the poster’s instance. This is a really annoying issue that results in misleading domains showing up next to posts as well as breaking image display in the post itself.
    • Comments sorted by ‘new’ (and maybe other modes?) don’t paginate properly.

    I may take on some other issues after that, but those three are what I want to fix most right now.



    • Sandbox a general computer security term for a limited area that untrusted code can operate in. Essentially, think of an unruly kid – it’s allowed to play in its sandbox and could make a big mess there, but it shouldn’t be able to mess up the rest of your house if it’s only allowed to play in the sandbox.

    • Site Isolation According to this post from 2021 on Mozilla’s blog, “Site Isolation” is the term they picked for loading different websites in different OS processes. As an ELI5… maybe think of it like moving from sites being in the computer equivalent of neighboring apartments to being in different buildings? IRL, you’re supposed to have a certain amount of privacy and security in your apartment but there’s limits because of the physical construction… A half decade or so ago, people figured out that you can do the equivalent of sticking your ear against the wall to try to hear what people were saying in the apartment next door; it’s more challenging to do that if you’re in the digital equivalent of a different building…

    • Total Cookie Protection Metaphorically speaking, websites can tape a name tag (“cookie”) to your jacket without you noticing. That includes not just the direct operator of the site (who use cookies like that to keep you logged in) but also other people like advertisers on the site. In the old way of handling cookies, whoever stuck that name tag on your jacket can read it, so advertisers could figure out the equivalent of “Oh that’s Bob – he just went to Walmart, and then the bank, and now he’s at a swap meet looking at used manga.” if they were advertising on all those sites. “Total Cookie Protection” as Mozilla calls it is basically changing your jacket for each place you visit. Bob has a jacket for Walmart, a jacket for the bank, and a jacket for the swap meet. The advertiser can tell if Bob’s been to those places before – the metaphorical name tags are still on each one – but doesn’t know it’s the same Bob who was just at the bank since he changed his jacket.

    • First Party Isolation seems to be an older name for a similar idea brought back into Firefox from Tor Browser. “Total Cookie Protection” seems to be Mozilla’s marketing of it when they enabled it by default, as far as I understand it? (There may be other features of it that I don’t understand though.)

    • Multi Account Container Going back to my name tag and jacket metaphor again, this is a feature that lets you have essentially multiple jackets for the same place that you can choose between. You can have your work clothes and your personal clothes and pick which is appropriate for the situation, metaphorically speaking. Particularly useful if you have multiple webmail/social media/whatever accounts from the same provider and want to stay logged in to all of them.







  • I’ve worked for a university before and it was very common for staff to remote into their systems from home – usually with SSH for CS types or Remote Desktop/Team Viewer/etc. for less computer-focused folks. (The former usually didn’t have much issue – the folks using the latter mechanisms got compromised a number of times… -.-) There was also a campus provided VPN that was required to access certain systems with instructions to students and staff on how to use it, but other systems just got public IP addresses.

    If what you’re doing is related to your work and campus IT doesn’t object, you’re probably fine to do it. I’ve run various kinds of websites and web apps for colleagues to collaborate on research projects. Being able to do things like that is kind of the point of the internet.

    Having seen a number of students, uh, push the limits and find the boundaries of acceptability the hard way though… I’d strongly advise you not to install cryptominers, run TOR exit nodes, or torrent TV shows/movies/etc. That kind of thing tends to get your systems in hot water with IT or other parts of the bureaucracy…







  • I’ve tried setting up projects that used hard links like that and there are some pros and cons to this. On the plus side, you can delete from one location and the file is still available in the other without having to manage a separate repository structure. On the down side, most software cannot copy the structure correctly to a different file system (even one that supports hard links), which can make backups and migrations annoying to deal with – generally you end up with multiple actual copies, ballooning disk space usage and sometimes causing weird issues if the two files linking to the same data (rather than just having copies of the same data) actually matters…

    I’d recommend sticking with the “primary repository of real files” and “multiple views filled with symlinks” structure over hardlinks unless you’re really sure you know what you’re getting yourself into.





  • Two quick ideas on possible approaches:

    1. Static page route. You can just write some Javascript to load the image from a file input in HTML, draw it resized to a canvas (based on an input slider or other input element), then save the canvas to an image. (There might even be simpler approaches if I wasn’t stupidly tired right now…) This can be done in a single file (HTML with embedded JS – and CSS if you want to style it a little) that you toss on any web server anywhere (e.g. Apache, nginx, whatever). Should work for JPEG, PNG, and probably WebP – maybe other regular image types too. Benefit: data never needs to leave your device.

    2. Process on server route. Use Python with a simple web server library (I usually opt for tornado for stuff like this, but flask or cherrypy or similar would probably work). Set up a handler for e.g. an HTTP POST and either pass the image into a library like Pillow to resize it or shell out to ImageMagick as others have suggested. (If you want to do something clever with animated GIFs you could shell out to ffmpeg, but that’d be a fair bit trickier…) The image can be sent back as the response. Be careful about security if you take this route. Probably want some kind of login in front of it, and run it in a VM or some other secure environment – especially if you’re using AI to kludge it together…

    Best of luck and let me know if you need any help. Will probably have some time this weekend if you can’t get it on your own. Happy hacking!