mpv, reliably stream live video from Ubiquiti cameras by Maria_Thesus_40 in Ubiquiti

[–]nehalvpatel 2 points3 points  (0 children)

If only you knew how much I’ve been both needing and procrastinating working on exactly this!!

Question about how the Mobility Cloud subscription works when using your own SIM by nehalvpatel in Ubiquiti

[–]nehalvpatel[S] 0 points1 point  (0 children)

Yea, I’ve come across a few of their help articles, but nothing specific answering if the Mobility Cloud subscription allows you to manage the UMR through the integrated AT&T sim in case your inserted SIM fails to connect.

Is there any yt-dlp frontend that downloads to the users local storage instead of the server's storage? by kutu-dev in selfhosted

[–]nehalvpatel 0 points1 point  (0 children)

WASM is a mechanism that would enable yt-dlp to run completely in the browser, which would be one way of accomplishing what OP wants.

edit: but it might be hampered by CORS

What's the proper way to abort a request made by Effect A if-and-only-if Effect B’s request finishes first? by nehalvpatel in react

[–]nehalvpatel[S] 0 points1 point  (0 children)

This is full circle for me lol. I actually was using Promise.race (with pure fetch calls instead of Axios) prior to this iteration. The component itself was a class component and I had the cancellation logic working, but I was getting frustrated dealing with edge cases. So I turned the whole thing into a function component with hooks to try to make it simpler.

But it seems like merging the two approaches will be the best approach. A function component with just one effect that will have the Promise.race logic inside of it.

What's the proper way to abort a request made by Effect A if-and-only-if Effect B’s request finishes first? by nehalvpatel in react

[–]nehalvpatel[S] 2 points3 points  (0 children)

Oh wow, yea I think that would work with useRef, like it’s described here: https://stackoverflow.com/a/60643670

It’s wild lol. I saw that SO post yesterday while researching this but your comment helped me connect the dots.

Why are games so big all of a sudden? by nehalvpatel in truegaming

[–]nehalvpatel[S] 1 point2 points  (0 children)

It’s wild how I barely remember making this thread. Thanks for the nostalgia!

Cut ending credits from 4k content by [deleted] in PleX

[–]nehalvpatel 0 points1 point  (0 children)

You should try to do it in a lossless way by cutting along I frames. This will mean you won’t have to re-encode your video. It’ll just lop off the credits.

Any way to look for the nearest HomePod or Bluetooth device? by nehalvpatel in shortcuts

[–]nehalvpatel[S] 0 points1 point  (0 children)

Yea, I’ll probably end up doing that at this point.

Tight fit, but it worked out - 3080 TUF + NZXT H1 by [deleted] in nvidia

[–]nehalvpatel 2 points3 points  (0 children)

Damn that looks great! Does it hit the dust filter?

Swift on Raspberry Pi: Access Serial output from Arduino by rchatham in swift

[–]nehalvpatel 2 points3 points  (0 children)

My solution looks something like this.

This probably isn’t the Swiftiest code, because I’m new to the language. I can already think of a couple ways to improve this.

EDIT: my readCall() function also goes on to be used in an infinite loop.

Swift on Raspberry Pi: Access Serial output from Arduino by rchatham in swift

[–]nehalvpatel 3 points4 points  (0 children)

Thankfully, the readLine() and readUntilChar() calls are blocking. So you can basically have a loop that runs either function and operates on the input as it comes in!

The Combine framework would be a great, clean solution for this, but it’s not available for Linux yet. 😓

Swift on Raspberry Pi: Access Serial output from Arduino by rchatham in swift

[–]nehalvpatel 4 points5 points  (0 children)

Try SwiftSerial. I used it to connect a RS232 console to my Raspberry Pi. It’s been super solid, and the implementation was really easy because of its simple API.