• 23 Posts
  • 115 Comments
Joined 1 year ago
cake
Cake day: June 5th, 2023

help-circle

  • but often lead developers to just display them in the frontend

    Oh boy I feel this one.
    My API is meant for scripting (i.e. it’s for developers and the errors are for developers), but the UI team uses it and they just straight display the error from their HTTP request for none technical people which might also not get to know all the parameters actually needed for the request.
    And even when the error is in fact in my code, and I sent all the data I need to debug and replicate the error, the users can’t tell me because the UI truncates the response, so the user only sees something like Error in pe1uca's API: {"error":"bad request","message":"Your request has an error, please check th... (truncated). So the message gets truncated and the link to the documentation is also never shown .-.





  • I can’t imagine this flow working with any DB without an UI to manage it.
    How are you going to store all that in an easy yet flexible way to handle all with SQL?

    A table for notes?
    What fields would it have? Probably just a text field.
    Creating it is simple: insert “initial note”… How are you going to update it? A simple update to the ID won’t work since you’ll be replacing all the content, you’d need to query the note, copy it to a text editor and then copy it back to a query (don’t forget to escape it).
    Then probably you want to know which is your oldest note, so you need to include created_at and updated_at fields.
    Maybe a title per note is a nice addition, so a new field to add title.

    What about the todo lists? Will they be stored in the same notes table?
    If so, then the same problem, how are you going to update them? Include new items, mark items as done, remove them, reorder them.
    Maybe a dedicated table, well, two tables, list metadata and list items.
    In metadata almost the same fields as notes, but description instead of text. The list items will have status and text.

    Maybe you can reuse the todo tables for your book list and links/articles to read.

    so that I can script its commands to create simpler abstractions, rather than writing out the full queries every time.

    This already exists, several note taking apps which wrap around either the filesystem or a DB so you only have to worry about writing your ideas into them.
    I’d suggest to not reinvent the wheel unless nothing satisfies you.

    What are the pros of using a DB directly for your use case?
    What are the cons of using a note taking app which will provide a text editor?

    If you really really want to use a DB maybe look into https://github.com/zadam/trilium
    It uses sqlite to store the notes, so maybe you can check the code and get an idea if it’s complicated or not for you to manually replicate all of that.
    If not, I’d also recommend obsidian, it stores the notes in md files, so you can open them with any software you want and they’ll have a standard syntax.




  • All the ones I’ve used require a separate service to actually do the query.
    You can use traccar, owntracks, or wanderer (this one is not realtime tho, and requires for you to find an app to send the data).
    There’s also gpslogger which can record everything locally (or send it to any URL you set), but you need another app or service to be able to query it properly.



  • I also like local only with a similar set up as yours, rsync to and HDD and to an SSD.
    But I also would recommend you to follow that suggestion, you need to have an external backup managed by someone else (encrypted, of course) so you can have options if anything happens to everything in your local.
    It’s up to you how much you’re willing to pay to be sure to be able to retrieve your data.

    I’m using iDrive e2, it says it has a limited offer, but it’s been there for over a year.

    Im basically paying $1.25 for 2TB per month (it’s charged at once for 24 months) https://www.idrive.com/s3-storage-e2/pricing




  • Found that also myself trying to do the same thing haha. I did the same process as OP, gparted took 2.5 hours in my 1TB HDD to create a new partition, then copying the data from old to new partition was painfully slow, so I went to copy it to another dive and into the new partition.
    Afterwards I deleted the old partition and grew the new one, which took a bit more than 1.5 hours.

    If I had the space I would have copied all the data out of the drive, formatted it and then copied back into. It would have been quicker.






  • I’m just annoyed by the regions issues, you’ll get pretty biased results depending in what region you select.
    If you try to search for something specific to a region with other selected you’ll find sometime empty results, which shows you won’t get relevant results about a search if you don’t properly select the region.

    Probably this is more obvious with non technical searches, for example my default region is canada-en and if I try “instituto nacional electoral” I only get a wiki page, an international site and some other random sites with no news, only when I change the region I get the official page ine.mx and news. For me this means kagi hides results from other regions instead of just boosting the selected region’s ones.






  • it just seems to redirect to an otherwise Internet accessible page.

    I’m using authelia with caddy but I’m guessing it could be similar, you need to configure the reverse proxy to expect the token the authentication service adds to each request and redirect to sign in if not. This way all requests to the site are protected (of course you’ll need to be aware of APIs or similar non-ui requests)

    I have to make an Internet accessible subdomain.

    That’s true, but you don’t have to expose the actual services you’re running. An easy solution would be to name it other thing, specially if the people using it trust you.
    Another would be to create a wildcard certificate, this way only you and those you share your site with will know the actual sub domain being used.

    My advice is from my personal setup, but still all internal being able to remotely access it via tailscale, so do you really need to make your site public to the internet?
    Only if you need to share it with multiple people is worth having it public, for just you or a few people is not worth the hassle.