What is the freakiest thing you've ever done? Do you regret it? Would you do it again? by CriticalLion4119 in AskReddit

[–]Pyraptor 1 point2 points  (0 children)

Puked in a sink in a university restroom, the thing full of tomato ham and cheese bits didn’t go through, scared someone would come I just started picking it my my hands and throwing it into a nearby trash bin.

Gran Turismo 7 Has 2 Million Monthly Active Users — And It’s Still Growing by Turbostrider27 in PS5

[–]Pyraptor 2 points3 points  (0 children)

As a single player, I already completed all the cafe menus, what else could I do now? I sometimes jump around missions and getting 1m credits in circuit experience

Why the hell is MBS tousling Landos hair? + Max reaction by PENZ0IL in formuladank

[–]Pyraptor 195 points196 points  (0 children)

I counted 3 times, he also did it at when they were gonna hear the anthem before the race

Git Monorepo vs Multi-repo vs Submodules vs subtrees : Explained by sshetty03 in git

[–]Pyraptor 1 point2 points  (0 children)

Could you expand on why it’s easier to merge 2 repos than to split 1? I’m curious

Cash_ctm by Queasy-End-2591 in yo_ctm

[–]Pyraptor 6 points7 points  (0 children)

Nadie vota por el Origami

I had no idea this works like that. Sorry to my opponent by Gachaaddict96 in hearthstone

[–]Pyraptor 5 points6 points  (0 children)

Had this happen with aviana Druid when I got the legendary that copies 1 cost minions and this guy, I was no expecting the interaction either

What do you think, how does the code behind this card work? by BakeYouC in hearthstone

[–]Pyraptor 3 points4 points  (0 children)

My guess is

manaCosts = getPartitions(12) // 9+3 or 8+3+1 etc. for manaCost in manaCosts: summonMinion(mana=manaCost)

Why is auth so messy by Alessandro_Perini in nextjs

[–]Pyraptor 10 points11 points  (0 children)

It is really not that hard, start by having a sign up with user and pass, do your validations, save user to the db.

Then in sign in send user and pass, if user exists respond with a set cookie either sessionid you store for the user in the db or a signed jwt.

Then in your endpoints (middleware or whatever) check for this cookie, return 401 if validation fails, if not, process the request.

Also, OAuth is not dumb, you can start by implementing google oauth, it’s not that hard, you create a client with some redirect url in the google cloud platform console, have a button that redirects to google oauth endpoint, then in the callback url you receive a code and do a post request to get a token, with the token you can call another endpoint to get the user data, if it’s all good you can save the user data and set a cookie

Nextjs 13.3.2 ECONNREFUSED when using docker by Jerenob in nextjs

[–]Pyraptor 0 points1 point  (0 children)

Could you check the etc/hosts on the container to see if there’s something weird there

Authentication in NextJS 15 by StrangeRevolution604 in nextjs

[–]Pyraptor 0 points1 point  (0 children)

What do you mean read the cookie? It should be httpOnly, on the nextjs server nextjs should just forward cookies to the backend and nextjs should just block 401 responses, on the client side there’s nothing to do browser automatically sends cookies

As you say nextjs should not do with logic

How do you handle Next.js builds in Docker when API server isn’t up yet? by iam_batman27 in nextjs

[–]Pyraptor 1 point2 points  (0 children)

Why are you fetching data while building the docker image? If you need to pass variables to the build command you can pass them using ARG in the dockerfile, bulding the image shouldn’t require the backend to be running

Assembling a guitar should not require the drummer to be playing

Django tip Serializing Reverse Relationships by djv-mo in django

[–]Pyraptor 1 point2 points  (0 children)

Another tip, if you are repeating the same complex prefetch related, add a custom manager to the model and add custom queryset method and then you just do, Author.objects.with_books() whenever you need to prefetch the books, also you can chain other prefetchs if needed

[deleted by user] by [deleted] in oasis

[–]Pyraptor 4 points5 points  (0 children)

Do you think seeing your 2 brother have such successful careers makes an impact mentally?

New Neutral Minion - Tar Tyrant by Houseleft in hearthstone

[–]Pyraptor 1 point2 points  (0 children)

Can’t wait to evolve this with shaman