u/InvaderToast348

375 post karma · 5,109 comment karma · joined Oct 2019

InvaderToast348

i ended up creating a bookmark which is a javascript function that just listens for the shift key and then runs debugger

didnt know about f8 though, thanks thats much better

edit: ah, f8 only works in the sources panel. so the bookmark is more useful since i can pause from any panel, eg elements or network

I've also found dom breakpoints helpful when working with data attributes & dynamic classes, you can attach at the moment an element is modified and see the call stack

InvaderToast348

You missed April's fools by almost 2 months

InvaderToast348

Haven't used Obsidian in a while but iirc you can do splitscreen with the same file in different modes, or you could use the live edit feature where it displays content in reading mode then when you place the cursor inside a paragraph it shows just that section in edit mode. Please correct me if I remember wrongly

InvaderToast348

No matter what is you're running, regular backups are important

I wouldn't know if open source OSes are any more or less vulnerable to user data loss, either way I would still have a solid 321 backup plan in place

My point was that especially when switching OS it would be important to make sure you've backed up EVERYTHING important. Eg my phone regularly backs up my photo library, but I don't backup apks or app data. If moving to a new phone or swapping os, there's a risk some important data is lost

Eg if an app uses a local sqlite database, you might not think to back that up regularly as you do with more common data

InvaderToast348

Please backup anything important first if you do decide to switch, just in case anything does go wrong and you eg brick your phone

InvaderToast348

Null coalescing ftw

But in this case, python or would be js ||

Since or will use the second value for any falsey expression - empty string, False, None

Edit: also in js you can do null accessing: possiblyNullOrUndefined?.someProperty possibleFn?.() possibleArray?.[3]

InvaderToast348

How is it different from envie?

https://envie.cloud/

(not affiliated, just curious)

InvaderToast348
  1. Introduces a nesting level & fragments the code
  2. Exceptions are more likely to be worse for performance than a single extra dict lookup
  3. if (v := some_dict.get(k)) is not None is a fairly clean one liner with no-key protection. Use some other default value if you need to know that the dict key exists and whether the value is None, although you'd probably be better with option 4
  4. if k in some_dict is generally perfectly fine, if you're worried about performance of dict keys then why use python

This is just premature optimisation. Unless you run a profiler and find a specific dict access to be a bottleneck / hotspot, this isn't a real issue and is more of a code style / formatting question, in which case option 4 is probably the most recommendable answer

Edit: just in case it wasn't clear, option 3 stores the value using the walrus operator and .get which has a default of None (falsey) for safe key lookup. A single lookup + key safety, it's the one I've normally gone for simply because of personal preference, to me it doesn't make the readability any worse, although some people may disagree, therefore option 4 and get the value separately would probably be next best

Edit 2: I didn't know about try-else, interesting to see that approach, thanks for making me aware. Id still argue in this case it fragments the code & is less readable than the walrus though.

InvaderToast348

Id recommend finding beginner python resources and trying to learn (eg youtube videos, online courses, etc)

Not to come off the wrong way, but it seems like you have little to no knowledge of programming, so it would be best to try to learn a little before going straight to Reddit

Freecodecamp has been a valuable resource for me, good info but can't remember how much basic stuff they cover

There's also the python docs

Things like this are incredibly fundamental, and learning to research well is an important skill - a quick Google would have given you plenty of answers

Whether you love it or hate it, if you can find an answer after some time researching yourself, you can ask AI although please don't rely on it or just blindly take what it says - just use it to find other sources and to explain concepts in a way you'll understand

InvaderToast348

Ah fair enough, didn't know about the hard refresh issue

Thanks 👍

InvaderToast348

No idea the tech stack behind this, but it's a fairly common practice to version static files, so that browsers fetch the latest when the version increments

Even just a query string with the version number is enough

On mobile right now so don't want to fight with a mobile keyboard trying to write a code block, but you should be fairly easily able to google some info about this

Would just make updates a little smoother and wouldnt take more than half an hour to implement a simple system

InvaderToast348

What is the specific error? DNS not resolved, connection refused, etc? eg are there any error messages hinting at the actual problem?

InvaderToast348

Have you tried network=host?

InvaderToast348

Thank you :)

InvaderToast348

I was playing java earlier and had an explored buried treasure map inside a bundle with other items (the loot from the chest). Unstackable in the normal inventory (player / chest / etc...), but seems to behave differently inside a bundle inventory.

Maybe a bug, are there any other examples of non stackables not taking up the entire bundle storage?

InvaderToast348

Can you ping the IP from the host?

InvaderToast348

Yes, please mark as such. To some of us it's clear from the readme, but imo there should be an explicit "Made with AI" heading at the bottom

InvaderToast348

Bad feedback

If this was made with ai, that should be made clear, even if it results in negative comments

People shouldn't be mislead and should know when they are using potentially bad software. Not that humans don't create bad software, but it is widely accepted that ai code is horrible in terms of security, best practices, bugs, maintainability, etc ...

I'm fine with people using ai if they wish, but it should be clear for others that want to avoid ai generated projects

This is not my opinion, this is how a large majority of the internet feels - eg r/selfhosted had a problem with users posting ai generated projects without warning as such, so a flair was created and posts must display whether AI was involved. Therefore people can filter those posts. I believe the internet as a whole would be a lot better if all services and platforms gave the choice to filter and ignore ai content, for those with no interest

InvaderToast348

Is your db running and reachable from the server container? This is a different error than OP

InvaderToast348

I assume you're using docker, as it's the recommended solution.

If you start a container with a bind mount to a folder/file that doesn't exist, it will create an empty folder in that location.

So if you didn't have the drive mounted at the point of starting the container, there should be an empty folder in the /media/USER/ folder, or wherever you mount drives to.

After confirming the folder is actually empty and it's not the actual drive, with both ls and sudo ls you can simply sudo gio trash /path/to/folder to delete the placeholder and remount the actual drive.

IIRC, if you try to mount the drive while the placeholder folder exists, it will instead mount to a separate folder of the same name with a number appended, eg HardDrive1

In that case rebooting should fix it after removing the placeholder folder. Can't remember if there is an easier way.

Hopefully this helps

Fyi, I have a python script that reminds me to connect and mount any external devices a container needs before starting it, haven't had to deal with this issue for a while now. Might be worth looking into something similar

Edit: guess that's my fault for not scrolling down first, looks like you already found the issue was incorrect mount paths 🤦‍♂️

InvaderToast348

Dnsmasq probably

InvaderToast348

Vibe coded, can't see a link to GitHub / docs / pricing pages, website was farted out by AI

Wouldn't touch with any documents I care about, fuck knows what it does with them

Edit: on mobile the pricing is at the bottom of the page, for some reason it's a bad UX horizontal scroll.

NO MENTION OF SELF HOSTED ANYWHERE, pretty sure this is just an ad

InvaderToast348

Or get someone else to join and build a platform / place a water bucket

InvaderToast348

This really feels like an AI response

If this is a vibe coded password manager, people should seriously reconsider using it

InvaderToast348

It's supposed to loop until the user provides a valid value, I'm not sure of a better way to do this?