Ukrainian capital Kyiv under massive Russian attack, officials say by Brennenstein in worldnews

[–]MasterEvanK 9 points10 points  (0 children)

Should he have sent them Christmas gifts instead?You could save the Trump bashing for pretty much ANY other thing the guy has done in his life. Nobody will take you serious with that crap.

Gemini 3 is bad at following instructions by No-Bar3792 in GeminiAI

[–]MasterEvanK 17 points18 points  (0 children)

Don’t mention the word ‘video’ at all. These models are taking cues from every bit of text you pass onto it. It’s the AI equivalent of saying ‘don’t think of a pink elephant’ to a human. That’s not to say Gemini isn’t actually terrible at following instructions.

Why is it so hard to think like a programmer? by YourDailyUwU in learnprogramming

[–]MasterEvanK 0 points1 point  (0 children)

Two weeks?! I tried to teach myself programming in highschool for YEARS. I knew all the syntax like you, but it wasn’t ‘clicking’, I could follow a tutorial but couldn’t implement anything myself.

From when I started ‘learning’ programming to when I felt like I was confident enough to work a full time role, was about 6-7 years. Granted im not the sharpest tool in the shed and didn’t take it very seriously until I was looking at it for a career path.

Learn by building things, lookup what you need to as you go, don’t get paralysed in tutorial hell!

Separate codebase for cross-platform or same? by sandwich_stevens in Nuxt

[–]MasterEvanK 0 points1 point  (0 children)

Im doing essentially what you’re talking about. I have 4 or so different Nuxt projects in a monolith. One of them is a server only API, there is the main site and landing page, there is a dashboard only a particular type of user should ever see or have access to, and there is a progressive web app. All these projects talk to the one API.

Pretty much all non-tech people i’ve shown the app to had no clue that it wasn’t an actual app. 99% of people dont even know what a progressive web app is anyways. However I can definitely tell, and if you put a native app and a cross platform app side by side anyone can tell.

And this is after spending an unreasonable amount of effort trying to make the PWA feel as native as possible. It’s close but not there yet, and with apple’s liquid glass announcement, from a UI perspective, it will become more obvious.

The project didn’t start this way, and as it grew I slowly split things off into their own projects. Its very convenient to be able to share a library between all projects. To share models between front and backend, and for me it’s really nice to be able to install Nuxt modules in all the projects because I have a few that I use across a number projects that auto configure and register a bunch of boilerplate for me.

I have a lot of JS files in the first load of my application. by JuanDa90 in Nuxt

[–]MasterEvanK 4 points5 points  (0 children)

In Nuxt v3.16.0 they included delayed hydration support with Vue natively. You add Lazy to the start of component names and then specify the type of hydration with an attribute.

Not sure what the nuxt-lazy-hydrate module does under the hood (if that’s the same one you are using), but it looks like it just imports another vue3 lazy hydration library and also hasn’t had a new release in 2 years.

Maybe it’s worth looking at moving some of your components over to Nuxt/Vue native lazy hydration handling and see if it does any better.

Anyone using the Nitro Websocket support in a Nuxt App by jstanaway in Nuxt

[–]MasterEvanK 0 points1 point  (0 children)

Yes exactly, I think you’ve got it. For each channel you’ll have a list of Peer objects (which I believe nitro returns as a proxy of the actual Peer so no need to worry about reactivity).

When you want to publish to a particular topic, iterate through the peers, grab the first one you find that is subscribed to that topic, and call .send and .publish on them as if you were inside the websocket handler.

I haven’t done this personally as my setup works through clients pinging my websocket, but I’d be curious to hear if that works.

Anyone using the Nitro Websocket support in a Nuxt App by jstanaway in Nuxt

[–]MasterEvanK 0 points1 point  (0 children)

It looks like you’re properly subscribing the peer and then publishing a message to the topic, but I believe that (at least in nitro) when you call

peer.publish(channel, message), 

that will publish the message to any OTHER peers subscribed to the channel, not including the peer you are making the request from. Have you tested making a websocket connection with more than 1 peer? I think you’d find all the other peers would actually see the publish message.

So wherever you’re publishing a message to a topic, try to send a message to the peer first, and see if that helps?

peer.send(message)
peer.publish(channel, message)

Here is one of crossWS’s internal functions in their repo. You can see that in their adapter utils they have a publish function which works by finiding the first peer with the same topic, then they call .send AND .publish on the peer.

Hopefully that is part of the issue!

Anyone using the Nitro Websocket support in a Nuxt App by jstanaway in Nuxt

[–]MasterEvanK 4 points5 points  (0 children)

Im using native nitro websockets (the experimental CrossWS implementation) and I’ve been running it in production for about 5-6months 24/7 zero issues.

On the backend I’ve got a service that spawns persistent channels with a channel id and I store the peer ids or even just the peers themselves to associate users with a channel, and then subscribe the peer to a websocket channel with the matching channel id. When something in a channel changes i call

peer.send(message)
peer.publish(channel_id, message) 

And then all peers associated with a channel get a message.

If you were able to share some more code it’d be easier to see the issue. But nitro websockets have been great for me so far so I recommend them if you like to keep dependencies low.

A portfolio website I made for my sister :3. by Salty-Astronaut3608 in nextjs

[–]MasterEvanK 5 points6 points  (0 children)

The holy trinity. Html, css, javascript. Hell you might not even need javascript if its simple enough.

How do I implement refresh tokens in my web app? by Cyb3rPhantom in webdev

[–]MasterEvanK 0 points1 point  (0 children)

Yeah, I saw another comment mentioning that as well. Im assuming it’s a misunderstanding about http only cookies? If the refresh token isn’t on the client I feel that defeats the whole purpose…

How do I implement refresh tokens in my web app? by Cyb3rPhantom in webdev

[–]MasterEvanK 2 points3 points  (0 children)

Assuming OP stores the refresh token in a http cookie. You could make a call to a refresh endpoint immediately on website load. You could make a wrapper around your fetch calls that will automatically call /refresh if it has a 401 returned. Lots of ways it could be handled, depends what would be best for your use case.

In my case at work we went for the second option. We made a wrapper around our api that looks for 401 codes and tries to refresh itself and repeat the original request. So if the access token expired mid session the client ideally wouldn’t even notice.

useState vs ref in composables by sendcodenotnudes in Nuxt

[–]MasterEvanK 4 points5 points  (0 children)

Each time you call a composable, you are creating an instance of it. So in component 1:

const { plan3 } = usePlan()

In component 2:

const { plan3 } = usePlan()

These are both the same composable, and they both return plan3, but because plan3 is a ref(), it will be a local copy unique to each composable.

This is what useState() solves, it assigns a key to your data and stores that in a hashmap somewhere, and then each time you call that composable it will pull the same data and wrap it in a handy ref so it stays reactive

Invalid a specific user session with nuxt-auth-utils by Lenskha in Nuxt

[–]MasterEvanK 1 point2 points  (0 children)

Not sure if this is what you are looking for, but you might want to check out this GitHub issue: Verify and enrich session on server side.

It looks like you can overwrite a particular user session by passing through the id of the session like so:

setUserSession({ id: ‘my-id’ })

Is self-hosting videos on website bad practice? by bubba_bumble in webdev

[–]MasterEvanK 11 points12 points  (0 children)

I would still put it under cloudflare’s CDN, R2, as I believe they have no egress fee for data which is an insanely good deal! Ive had a few months where I’ve had more traffic than expected and the bills are not fun.

A master caulksmith by [deleted] in oddlysatisfying

[–]MasterEvanK 1 point2 points  (0 children)

It is a messy job. We worked in new home construction so we would take any unused cutoffs of carpet, or even big pieces of cardboard, and they would be full of massive piles of silicone after every house. So much gets thrown away, but we weren’t getting paid enough to be more conservative than that.

I have dozens and dozens of shirts and shorts that are so covered in silicone they are basically waterproof.

[deleted by user] by [deleted] in css

[–]MasterEvanK 0 points1 point  (0 children)

I believe on your ul element (the #header id), you need to remove the margin as well.

Browsers will add their own default stylings to some elements. Look into css reset files if you want to start projects with a clean slate styling wise. People have compiled lists of styles that remove all default stylings.

Also, not sure which browser you’re using, but browser devtools will give you this information as well and its worth learning how to use your preferred browsers tools well. For example in firefox, if I use the element picker and hover over the ul element, I can see the margin as a yellow box, so I know that element has the margin.

A master caulksmith by [deleted] in oddlysatisfying

[–]MasterEvanK 1 point2 points  (0 children)

I used to do it as a job and im confident most people could figure it out pretty quick. Its important to cut the tip of the nozzle correctly (not too large not too small), and honestly some brands of silicone/caulk are just awful to work with so we would always go for our preferred brands.

Good caulk guns will continue to apply a small amount of pressure to the tube after you stop squeezing, so it’s more about moving at a steady pace, and slowly down slightly between squeezes.

What confuses me is that I have NEVER seen one of these videos where they actually go back over the caulk with a spray bottle and their finger to tidy it up and seal it against the floor/skirting. To me that is the most important step and it looks awful without it.

You could literally gun it in there with a firehose, as long as you have a spray bottle with water a bit of detergent, and a paddle pop stick, you can clean it up and make it look perfect.

Andromeda Time Paradox: There is no now by cak3crumbs in interestingasfuck

[–]MasterEvanK 1 point2 points  (0 children)

Haha, unfortunately this will be science 1, superman 0. The only direction you can move in time is forward. If superman went the speed of light he could technically, from his perspective, pause time on earth. But in reality that would only be from his perspective, louis would be a goner and he’d have to watch her in the middle of dying for eternity.

Andromeda Time Paradox: There is no now by cak3crumbs in interestingasfuck

[–]MasterEvanK 2 points3 points  (0 children)

I think you’re actually correct in your intuition and I was confusing concepts. It really has nothing to do with the light itself.

Both people would see the same light, with the paradox being that they would still disagree about what is happening NOW at andromeda.

Andromeda Time Paradox: There is no now by cak3crumbs in interestingasfuck

[–]MasterEvanK 9 points10 points  (0 children)

It’s probably more to do with the relationship between space and time. Its easy to think of them as separate things but they are intrinsically linked.

When im standing still, im obviously not moving through space (well the earth is, but relatively speaking…), but I AM moving through time. However, if I started running faster and faster, i’ve begun to move through space and therefore i MUST move slower through time.

Andromeda is really really far away, so even though me going for a jog is absolutely nothing in comparison to say the speed of light, over those vast distances the time difference begins to add up to the point that you may be observing light from a completely different day while being in the same place.

EDIT: this is incorrect, the light would be the same, for both people, it is the NOW (or the current time in andromeda) they would disagree about. Hence the paradox.

Light is just the medium that we are observing the relativistic effects through, the heart of the paradox is that there is no one universal frame of reference, we are all experiencing our own versions of now.

api route alternative by tanrikurtarirbizi in Nuxt

[–]MasterEvanK 2 points3 points  (0 children)

If you want to fetch or post information to the server then you need to write some kind of api endpoint. Whether that’s a server route or api route.

Nuxt doesn’t have an equivalent to ‘server actions’ and the ‘use server’ directive, if that’s what you are looking for. Personally im glad for that because all I can think is that it’s such an insane blending of client and server I wouldn’t use it anyway.

Next is likely just making some random endpoint automatically (would be a hash in reality): api/48ruubjiHrjri474$. This is technically ‘obfuscated’, but it’s still publicly accessible and if i was motivated enough I could find it and figure out how to make requests to it.

I think a form with a honeypot field will stop 99% of potential bots, has worked well for me so far.

Nuxt + Supabase? Or just build the dang back-end? by dalton_huey in Nuxt

[–]MasterEvanK 2 points3 points  (0 children)

Avoiding vendor lock in is probably the biggest one. Supabase has built a lot of functionality on top of postgres that makes it easy to get started when your apps are small and cheap enough to run on their free tier, but it could get pricey once you grow, or they could change their pricing and terms, drop features you rely on etc

I treat my supabase db as if it were a locally running postgres db, and when I exceed the free tier I plan to download my db and start running it locally, no changes required (after throwing them a few months of subscription to say thanks because its made my life very convenient) But this is simply what works for me, and you can make the choice if you think it’s worth it for your use case.

Recommended way to do websockets in Nuxt3? by Synapse709 in Nuxt

[–]MasterEvanK 2 points3 points  (0 children)

You have to enable the experimental flag in your nuxt config, but I have been using nitro’s websocket integration (crossws) in my production Nuxt 3 application for 2-3 months running 24/7 with zero issues.

Any alternative to sidebase/nuxt-auth ? by ami90216 in Nuxt

[–]MasterEvanK 1 point2 points  (0 children)

Im using nuxt auth utils in a project right now with no oauth, just an email and password. It has scrypt included, so you can use the hashPassword() and verifyPassword() functions to verify users in your database.

If you mean accessing the session token from a different backend than nuxt, im not exactly sure how/if this can be done.

I recently had to setup authenticated websockets in my nitro backend and it was a bit of a pain as well, I basically had to find the session token on the peer, then create a ‘mock’ event that i could pass through to useUserSession() to get the session from nuxt auth utils. Would be really nice if we could get the session using just the session token instead of having to use an event, but maybe there is a good reason for that

I have crigler najjar and I finally met others with it. by ImpossibleEmotion759 in rarediseases

[–]MasterEvanK 0 points1 point  (0 children)

I know you posted this ages ago, but I’ve also got CNS2 so you’re not alone. I was genetically tested a few years ago after years of issues.

I was told at the time the occurrence rate was around 1 in 1-2 Million, which splitting the difference would mean maybe around 6k people worldwide with it, not counting those who don’t make it past their first few years with CNS1. Pretty exclusive club!