Interests: programming, video games, anime, music composition

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

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

help-circle



  • the thumbnails now are even more clearly 4-pixel potatoes

    pictrs’s thumbnail parameter uses dumb raw pixel sampling – which leaves something to be desired… It has other sampling options implemented (with resize, according to the docs), but they don’t seem to accessible on my instance. You can remove thumbnail=96 if you want to get the image without that thumbnail sampling, at least.

    make everything zoom 150%

    I do this with my browser’s UI (ctrl-plus keyboard shortcut in FF-based browsers works for me).

    e.g. right side bar

    [...document.querySelectorAll(".side")].forEach(sidebar => sidebar.remove())

    You could also just adblock the element with class side.



  • Voting

    You could support this by making vote buttons submit a form if JS isn’t enabled. (That’s what mlmym does.)

    Can’t manually switch between dark and light mode

    Hmm… There are some pretty nifty things you can do with a hidden checkbox, label, and some clever CSS (e.g. html:has(#element:checked) + CSS variables – though FYI :has is baseline 2023.)

    Making it persistent would require some more effort – e.g. form + cookies + server side style sheet selection, most likely. mlmym lets users change their theme w/o JS by submiting a form on the setting page. I’d have to think a bit if there’s a good way to make it persistent across multiple requests for logged out users with a CDN caching things in between though…

    only automatically based on browser settings

    Doesn’t actually work for me in a FF138-based browser w/ JS blocked via NoScript – I always get light mode despite having a dark mode preference set. (Where do you have your prefers-color-scheme media query?)

    Also, FYI I had to manually override font restriction – otherwise all your buttons end up as tofu characters. (I think NoScript is being kind of unreasonably strict there by blocking first party fonts.) That’s a papercut kind of issue, but figured I’d point it out in case it might save you some debugging time if you get confused NoScript users in the future.


  • I picked an RNG name since my old common username (from reddit, etc) was not available when I started on kbin.social (RIP) and I couldn’t think of anything else I wanted to be called. I deliberately kept it short though. Not sure what to make of other RNG names – esp. long unintelligible ones – but I’ve seen at least one account that I think is legit which has a long, bizarre RNG-looking username and a non-English display name, so 🤷️




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





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


  • I would be happy with a FOSS desktop app I can install in linux too

    On the command line, you can do this with ImageMagick (e.g. use the command convert once it’s installed).

    With a (desktop) GUI, there’s a bunch of programs. GIMP is probably the most well known and has a ton of capabilities but is a bit complex. I use Kolourpaint as a quick-and-dirty “MS Paint”-like program for very simple tasks where I want a GUI.

    If you want a simple web UI I’m sure there is one already, but I don’t know one specifically. It wouldn’t be too complicated to hack something up if all you need is a quick-and-dirty file input and percentage rescale or something like that. If you don’t get a better suggestion and don’t know how to make something like that yourself, let me know and I can write an example.


  • People have already covered most of the tools I typically use, but one I haven’t seen listed yet that is sometimes convenient is python3 -m http.server which runs a small web server that shares whatever is in the directory you launched it from. I’ve used that to download files onto my phone before when I didn’t have the right USB cables/adapters handy as well as for getting data out of VMs when I didn’t want to bother setting up something more complex.


  • e0qdk@reddthat.comtoFediverse@lemmy.worldKarma in lemmy?
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    4 months ago

    I’m under the impression the reputation points are either the combined number of upvotes or that minus downvotes

    IIRC from kbin – and assuming mbin didn’t change things – boosts counted for two points while upvotes (favorites) are one point and downvotes (reduces) are one point. Boosts are basically retweets, IIRC, and wouldn’t be coming from lemmy users – just from Mastodon, mbin, and other tools that support it.

    Edit: To clarify, I mean downvotes reduce by one point.