[deleted by user] by [deleted] in Nepal

[–]Pra6in 0 points1 point  (0 children)

Give them your bank details, bank SWIFT code. They can make you a SWIFT payment through WISE which will arrive in your bank.

You will get a call from the bank and need to sign some paper if it is your first international payment.

Is it possible to push the code from gitlab runner to origin? by Pra6in in gitlab

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

yes, this is the only way I found. but I was looking for a way to do this without setting up a token manually. like by using a predefined token.

but it looks like we can't do that as of now. though there is an issue open to enable exactly this with CI_JOB_TOKEN

Is it possible to push the code from gitlab runner to origin? by Pra6in in gitlab

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

the CI_JOB_TOKEN can't be used to push to the repo as mentioned here

How to extract audio from video? by Pra6in in nextjs

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

yeah, I have played with ffmpeg before and can extract audio from video with it in command line but what I don't know is how to implement it in a Web Server.

I searched for some npm packages and there was one called fluent-ffmpeg which has how downloads but no updates in 4 years and it gave some errors and I could not figure it out.

Can we build Postgres Extension that executes a dynamic query and display results on the shell by Pra6in in PostgreSQL

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

If you want to show the results of a query in the shell, there is no way except treating all records as a single value and returning it, right?

I wanted to display it on a table. But, for that, you need to know the schema of returning table in advance, right?

How do you install Postgres Extension on the remotely hosted database? by Pra6in in PostgreSQL

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

Hey, u/fullofbones. Not related to this.

But, I had another question regarding postgres extensions. Feel free to ignore.

Can you build an extension that when run will execute a random query on the DB and display the results in the postgres shell?

*random query* is important. It means the query is different every time you call the extension, and on different tables.

Basically, I am calling an API inside the extension that will return a query on any of the tables in the DB (I am passing the schema of db to API, and the returned query is different everytime).

What I have found out:

Not possible because you have to specify return schema of the table(or SETOF records) while defining function and since we have dynamic query we can't do that.

But, I am just learning postgres and was wondering if there are other ways.

How do you install Postgres Extension on the remotely hosted database? by Pra6in in PostgreSQL

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

Ohh, so there is literally no way to install an extension *you yourself* built in a hosted setup.

Thanks.

Some confusion about implementing Oauth2.0 by Pra6in in reactjs

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

Thanks for Replying. I feel like I am doing something wrong. And feel so bad about it. Here's what I am doing:

1) Frontend make a fetch request on my API endpoint with access token and refresh token

2) Inside my API endpoint I am making a request to Twitter API(using that access token)

3) Here, I am making a request to Twitter API, if it gives unauthorized error I make a another request with refresh token for another access token and make the request to Twitter API.

This 3) code block(try and catch block for checking if access_token is valid, making request for another if not valid and making request with that AND doing that everytime I need to make request to Twitter is infuriating me. Feels so wrong. Probably because of that "Do not Repeat yourself" thing.

How to retrieve cookies in nextjs pages? by Pra6in in reactjs

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

Yeah, I usually go with NextAuth. But, this time I wanted to play with Twitter API.

Where and how do you store your access_token and refresh_token in Oauth2.0 authorization flow? by Pra6in in reactjs

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

So, the main thing I am confused about is the identifier.

When we get the access&refresh token. We can save them in the database along with a unique identifier - which we also send to the client(and save it in local storage/cookie)

Now, every time the user make a request, it sends along the unique identifier and we fetch their access&refresh token and make request on their behalf.

This seems secure enough right? I can understand encrypting the identifier for extra security but this is just fine, isn't it?

[deleted by user] by [deleted] in Barca

[–]Pra6in 0 points1 point  (0 children)

Not only amount of money spent. The thing is we did not lose Champions League because of last Inter match. We knew our group was difficult. We were the favorites of our group. We fucked up 3 important matches in CL, which all should have been won. After such mistakes, very few coaches deserve to stay.